home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Hardware / PowerManager DDK 1.0f1 / Interfaces&Libraries / Interfaces / Files.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-08  |  170.0 KB  |  4,134 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Files.h
  3.  
  4.      Contains:    File Manager (MFS, HFS, and HFS+) Interfaces.
  5.  
  6.      Version:    Mac OS 8.5
  7.  
  8.      DRI:        Mark Day
  9.  
  10.      Copyright:    © 1985-1999 by Apple Computer, Inc., all rights reserved
  11.  
  12.      Warning:    *** APPLE INTERNAL USE ONLY ***
  13.                  This file may contain unreleased API's
  14.  
  15.      BuildInfo:    Built by:            Scott Johnson
  16.                  On:                    10/8/99 11:26 AM
  17.                  With Interfacer:    3.0d13   (MPW PowerPC)
  18.                  From:                Files.i
  19.                      Revision:        106
  20.                      Dated:            5/5/99
  21.                      Last change by:    msd
  22.                      Last comment:    [2317975]  Add FSCompareHFSPlusNames (HighLevelFSDispatch,
  23.  
  24.      Bugs:        Report bugs to Radar component "System Interfaces", "Latest"
  25.                  List the version information (from above) in the Problem Description.
  26.  
  27. */
  28. #ifndef __FILES__
  29. #define __FILES__
  30.  
  31. #ifndef __MACTYPES__
  32. #include <MacTypes.h>
  33. #endif
  34.  
  35. #ifndef __MIXEDMODE__
  36. #include <MixedMode.h>
  37. #endif
  38.  
  39. #ifndef __OSUTILS__
  40. #include <OSUtils.h>
  41. #endif
  42.  
  43. #ifndef __TEXTCOMMON__
  44. #include <TextCommon.h>
  45. #endif
  46.  
  47. #ifndef __UTCUTILS__
  48. #include <UTCUtils.h>
  49. #endif
  50.  
  51. /* Finder constants were moved to Finder.≈ */
  52. #ifndef __FINDER__
  53. #include <Finder.h>
  54. #endif
  55.  
  56.  
  57.  
  58.  
  59. #if PRAGMA_ONCE
  60. #pragma once
  61. #endif
  62.  
  63. #ifdef __cplusplus
  64. extern "C" {
  65. #endif
  66.  
  67. #if PRAGMA_IMPORT
  68. #pragma import on
  69. #endif
  70.  
  71. #if PRAGMA_STRUCT_ALIGN
  72.     #pragma options align=mac68k
  73. #elif PRAGMA_STRUCT_PACKPUSH
  74.     #pragma pack(push, 2)
  75. #elif PRAGMA_STRUCT_PACK
  76.     #pragma pack(2)
  77. #endif
  78.  
  79. enum {
  80.     fsCurPerm                    = 0x00,                            /* open access permissions in ioPermssn */
  81.     fsRdPerm                    = 0x01,
  82.     fsWrPerm                    = 0x02,
  83.     fsRdWrPerm                    = 0x03,
  84.     fsRdWrShPerm                = 0x04,
  85.     fsRdDenyPerm                = 0x10,                            /* for use with OpenDeny and OpenRFDeny */
  86.     fsWrDenyPerm                = 0x20                            /* for use with OpenDeny and OpenRFDeny */
  87. };
  88.  
  89. enum {
  90.     fsRtParID                    = 1,
  91.     fsRtDirID                    = 2
  92. };
  93.  
  94. enum {
  95.     fsAtMark                    = 0,                            /* positioning modes in ioPosMode */
  96.     fsFromStart                    = 1,
  97.     fsFromLEOF                    = 2,
  98.     fsFromMark                    = 3
  99. };
  100.  
  101. enum {
  102.                                                                 /* ioPosMode flags */
  103.     pleaseCacheBit                = 4,                            /* please cache this request */
  104.     pleaseCacheMask                = 0x0010,
  105.     noCacheBit                    = 5,                            /* please don't cache this request */
  106.     noCacheMask                    = 0x0020,
  107.     rdVerifyBit                    = 6,                            /* read verify mode */
  108.     rdVerifyMask                = 0x0040,
  109.     rdVerify                    = 64,                            /* old name of rdVerifyMask */
  110.     newLineBit                    = 7,                            /* newline mode */
  111.     newLineMask                    = 0x0080,
  112.     newLineCharMask                = 0xFF00                        /* newline character */
  113. };
  114.  
  115.  
  116. enum {
  117.                                                                 /* CatSearch Search bitmask Constants */
  118.     fsSBPartialName                = 1,
  119.     fsSBFullName                = 2,
  120.     fsSBFlAttrib                = 4,
  121.     fsSBFlFndrInfo                = 8,
  122.     fsSBFlLgLen                    = 32,
  123.     fsSBFlPyLen                    = 64,
  124.     fsSBFlRLgLen                = 128,
  125.     fsSBFlRPyLen                = 256,
  126.     fsSBFlCrDat                    = 512,
  127.     fsSBFlMdDat                    = 1024,
  128.     fsSBFlBkDat                    = 2048,
  129.     fsSBFlXFndrInfo                = 4096,
  130.     fsSBFlParID                    = 8192,
  131.     fsSBNegate                    = 16384,
  132.     fsSBDrUsrWds                = 8,
  133.     fsSBDrNmFls                    = 16,
  134.     fsSBDrCrDat                    = 512,
  135.     fsSBDrMdDat                    = 1024,
  136.     fsSBDrBkDat                    = 2048,
  137.     fsSBDrFndrInfo                = 4096,
  138.     fsSBDrParID                    = 8192
  139. };
  140.  
  141. enum {
  142.                                                                 /* CatSearch Search bit value Constants */
  143.     fsSBPartialNameBit            = 0,                            /*ioFileName points to a substring*/
  144.     fsSBFullNameBit                = 1,                            /*ioFileName points to a match string*/
  145.     fsSBFlAttribBit                = 2,                            /*search includes file attributes*/
  146.     fsSBFlFndrInfoBit            = 3,                            /*search includes finder info*/
  147.     fsSBFlLgLenBit                = 5,                            /*search includes data logical length*/
  148.     fsSBFlPyLenBit                = 6,                            /*search includes data physical length*/
  149.     fsSBFlRLgLenBit                = 7,                            /*search includes resource logical length*/
  150.     fsSBFlRPyLenBit                = 8,                            /*search includes resource physical length*/
  151.     fsSBFlCrDatBit                = 9,                            /*search includes create date*/
  152.     fsSBFlMdDatBit                = 10,                            /*search includes modification date*/
  153.     fsSBFlBkDatBit                = 11,                            /*search includes backup date*/
  154.     fsSBFlXFndrInfoBit            = 12,                            /*search includes extended finder info*/
  155.     fsSBFlParIDBit                = 13,                            /*search includes file's parent ID*/
  156.     fsSBNegateBit                = 14,                            /*return all non-matches*/
  157.     fsSBDrUsrWdsBit                = 3,                            /*search includes directory finder info*/
  158.     fsSBDrNmFlsBit                = 4,                            /*search includes directory valence*/
  159.     fsSBDrCrDatBit                = 9,                            /*directory-named version of fsSBFlCrDatBit*/
  160.     fsSBDrMdDatBit                = 10,                            /*directory-named version of fsSBFlMdDatBit*/
  161.     fsSBDrBkDatBit                = 11,                            /*directory-named version of fsSBFlBkDatBit*/
  162.     fsSBDrFndrInfoBit            = 12,                            /*directory-named version of fsSBFlXFndrInfoBit*/
  163.     fsSBDrParIDBit                = 13                            /*directory-named version of fsSBFlParIDBit*/
  164. };
  165.  
  166. enum {
  167.                                                                 /* vMAttrib (GetVolParms) bit position constants */
  168.     bLimitFCBs                    = 31,
  169.     bLocalWList                    = 30,
  170.     bNoMiniFndr                    = 29,
  171.     bNoVNEdit                    = 28,
  172.     bNoLclSync                    = 27,
  173.     bTrshOffLine                = 26,
  174.     bNoSwitchTo                    = 25,
  175.     bNoDeskItems                = 20,
  176.     bNoBootBlks                    = 19,
  177.     bAccessCntl                    = 18,
  178.     bNoSysDir                    = 17,
  179.     bHasExtFSVol                = 16,
  180.     bHasOpenDeny                = 15,
  181.     bHasCopyFile                = 14,
  182.     bHasMoveRename                = 13,
  183.     bHasDesktopMgr                = 12,
  184.     bHasShortName                = 11,
  185.     bHasFolderLock                = 10,
  186.     bHasPersonalAccessPrivileges = 9,
  187.     bHasUserGroupList            = 8,
  188.     bHasCatSearch                = 7,
  189.     bHasFileIDs                    = 6,
  190.     bHasBTreeMgr                = 5,
  191.     bHasBlankAccessPrivileges    = 4,
  192.     bSupportsAsyncRequests        = 3,                            /* asynchronous requests to this volume are handled correctly at any time*/
  193.     bSupportsTrashVolumeCache    = 2
  194. };
  195.  
  196. enum {
  197.                                                                 /* vMAttrib (GetVolParms) bit position constants */
  198.     bHasDirectIO                = 1
  199. };
  200.  
  201. enum {
  202.                                                                 /* Desktop Database icon Constants */
  203.     kLargeIcon                    = 1,
  204.     kLarge4BitIcon                = 2,
  205.     kLarge8BitIcon                = 3,
  206.     kSmallIcon                    = 4,
  207.     kSmall4BitIcon                = 5,
  208.     kSmall8BitIcon                = 6
  209. };
  210.  
  211. enum {
  212.     kLargeIconSize                = 256,
  213.     kLarge4BitIconSize            = 512,
  214.     kLarge8BitIconSize            = 1024,
  215.     kSmallIconSize                = 64,
  216.     kSmall4BitIconSize            = 128,
  217.     kSmall8BitIconSize            = 256
  218. };
  219.  
  220. enum {
  221.                                                                 /* Large Volume Constants */
  222.     kWidePosOffsetBit            = 8,
  223.     kUseWidePositioning            = (1 << kWidePosOffsetBit),
  224.     kMaximumBlocksIn4GB            = 0x007FFFFF
  225. };
  226.  
  227. enum {
  228.                                                                 /* Foreign Privilege Model Identifiers */
  229.     fsUnixPriv                    = 1
  230. };
  231.  
  232. enum {
  233.                                                                 /* Authentication Constants */
  234.     kNoUserAuthentication        = 1,
  235.     kPassword                    = 2,
  236.     kEncryptPassword            = 3,
  237.     kTwoWayEncryptPassword        = 6
  238. };
  239.  
  240.  
  241. /* mapping codes (ioObjType) for MapName & MapID */
  242. enum {
  243.     kOwnerID2Name                = 1,
  244.     kGroupID2Name                = 2,
  245.     kOwnerName2ID                = 3,
  246.     kGroupName2ID                = 4,                            /* types of oj object to be returned (ioObjType) for _GetUGEntry */
  247.     kReturnNextUser                = 1,
  248.     kReturnNextGroup            = 2,
  249.     kReturnNextUG                = 3
  250. };
  251.  
  252. /* vcbFlags bits */
  253. enum {
  254.     kVCBFlagsIdleFlushBit        = 3,                            /* Set if volume should be flushed at idle time */
  255.     kVCBFlagsIdleFlushMask        = 0x0008,
  256.     kVCBFlagsVolumeDirtyBit        = 15,                            /* Set if volume information has changed since the last FlushVol */
  257.     kVCBFlagsVolumeDirtyMask    = 0x8000
  258. };
  259.  
  260. /* ioFlAttrib bits returned by PBGetCatInfo */
  261. enum {
  262.                                                                 /* file and directory attributes in ioFlAttrib */
  263.     kioFlAttribLockedBit        = 0,                            /* Set if file or directory is locked */
  264.     kioFlAttribLockedMask        = 0x01,
  265.     kioFlAttribResOpenBit        = 2,                            /* Set if resource fork is open */
  266.     kioFlAttribResOpenMask        = 0x04,
  267.     kioFlAttribDataOpenBit        = 3,                            /* Set if data fork is open */
  268.     kioFlAttribDataOpenMask        = 0x08,
  269.     kioFlAttribDirBit            = 4,                            /* Set if this is a directory */
  270.     kioFlAttribDirMask            = 0x10,
  271.     ioDirFlg                    = 4,                            /* Set if this is a directory (old name) */
  272.     ioDirMask                    = 0x10,
  273.     kioFlAttribCopyProtBit        = 6,                            /* Set if AppleShare server "copy-protects" the file */
  274.     kioFlAttribCopyProtMask        = 0x40,
  275.     kioFlAttribFileOpenBit        = 7,                            /* Set if file (either fork) is open */
  276.     kioFlAttribFileOpenMask        = 0x80,                            /* ioFlAttrib for directories only */
  277.     kioFlAttribInSharedBit        = 2,                            /* Set if the directory is within a shared area of the directory hierarchy */
  278.     kioFlAttribInSharedMask        = 0x04,
  279.     kioFlAttribMountedBit        = 3,                            /* Set if the directory is a share point that is mounted by some user */
  280.     kioFlAttribMountedMask        = 0x08,
  281.     kioFlAttribSharePointBit    = 5,                            /* Set if the directory is a share point */
  282.     kioFlAttribSharePointMask    = 0x20
  283. };
  284.  
  285. /* ioFCBFlags bits returned by PBGetFCBInfo */
  286. enum {
  287.     kioFCBWriteBit                = 8,                            /* Data can be written to this file */
  288.     kioFCBWriteMask                = 0x0100,
  289.     kioFCBResourceBit            = 9,                            /* This file is a resource fork */
  290.     kioFCBResourceMask            = 0x0200,
  291.     kioFCBWriteLockedBit        = 10,                            /* File has a locked byte range */
  292.     kioFCBWriteLockedMask        = 0x0400,
  293.     kioFCBSharedWriteBit        = 12,                            /* File is open for shared write access */
  294.     kioFCBSharedWriteMask        = 0x1000,
  295.     kioFCBFileLockedBit            = 13,                            /* File is locked (write-protected) */
  296.     kioFCBFileLockedMask        = 0x2000,
  297.     kioFCBOwnClumpBit            = 14,                            /* File has clump size specified in FCB */
  298.     kioFCBOwnClumpMask            = 0x4000,
  299.     kioFCBModifiedBit            = 15,                            /* File has changed since it was last flushed */
  300.     kioFCBModifiedMask            = 0x8000
  301. };
  302.  
  303. enum {
  304.     kioFCBLargeFileBit            = 11,                            /* File may grow beyond 2GB; cache uses file blocks, not bytes */
  305.     kioFCBLargeFileMask            = 0x0800
  306. };
  307.  
  308. /* ioACUser bits returned by PBGetCatInfo */
  309. /* Note: you must clear ioACUser before calling PBGetCatInfo because some file systems do not use this field */
  310. enum {
  311.     kioACUserNoSeeFolderBit        = 0,                            /* Set if user does not have See Folder privileges */
  312.     kioACUserNoSeeFolderMask    = 0x01,
  313.     kioACUserNoSeeFilesBit        = 1,                            /* Set if user does not have See Files privileges */
  314.     kioACUserNoSeeFilesMask        = 0x02,
  315.     kioACUserNoMakeChangesBit    = 2,                            /* Set if user does not have Make Changes privileges */
  316.     kioACUserNoMakeChangesMask    = 0x04,
  317.     kioACUserNotOwnerBit        = 7,                            /* Set if user is not owner of the directory */
  318.     kioACUserNotOwnerMask        = 0x80
  319. };
  320.  
  321. /* Folder and File values of access privileges in ioACAccess */
  322. enum {
  323.     kioACAccessOwnerBit            = 31,                            /* User is owner of directory */
  324.     kioACAccessOwnerMask        = (long)0x80000000,
  325.     kioACAccessBlankAccessBit    = 28,                            /* Directory has blank access privileges */
  326.     kioACAccessBlankAccessMask    = 0x10000000,
  327.     kioACAccessUserWriteBit        = 26,                            /* User has write privileges */
  328.     kioACAccessUserWriteMask    = 0x04000000,
  329.     kioACAccessUserReadBit        = 25,                            /* User has read privileges */
  330.     kioACAccessUserReadMask        = 0x02000000,
  331.     kioACAccessUserSearchBit    = 24,                            /* User has search privileges */
  332.     kioACAccessUserSearchMask    = 0x01000000,
  333.     kioACAccessEveryoneWriteBit    = 18,                            /* Everyone has write privileges */
  334.     kioACAccessEveryoneWriteMask = 0x00040000,
  335.     kioACAccessEveryoneReadBit    = 17,                            /* Everyone has read privileges */
  336.     kioACAccessEveryoneReadMask    = 0x00020000,
  337.     kioACAccessEveryoneSearchBit = 16,                            /* Everyone has search privileges */
  338.     kioACAccessEveryoneSearchMask = 0x00010000,
  339.     kioACAccessGroupWriteBit    = 10,                            /* Group has write privileges */
  340.     kioACAccessGroupWriteMask    = 0x00000400,
  341.     kioACAccessGroupReadBit        = 9,                            /* Group has read privileges */
  342.     kioACAccessGroupReadMask    = 0x00000200,
  343.     kioACAccessGroupSearchBit    = 8,                            /* Group has search privileges */
  344.     kioACAccessGroupSearchMask    = 0x00000100,
  345.     kioACAccessOwnerWriteBit    = 2,                            /* Owner has write privileges */
  346.     kioACAccessOwnerWriteMask    = 0x00000004,
  347.     kioACAccessOwnerReadBit        = 1,                            /* Owner has read privileges */
  348.     kioACAccessOwnerReadMask    = 0x00000002,
  349.     kioACAccessOwnerSearchBit    = 0,                            /* Owner has search privileges */
  350.     kioACAccessOwnerSearchMask    = 0x00000001,
  351.     kfullPrivileges                = 0x00070007,                    /*            ; all privileges for everybody and owner*/
  352.     kownerPrivileges            = 0x00000007                    /*            ; all privileges for owner only*/
  353. };
  354.  
  355. /* values of user IDs and group IDs */
  356. enum {
  357.     knoUser                        = 0,
  358.     kadministratorUser            = 1
  359. };
  360.  
  361. enum {
  362.     knoGroup                    = 0
  363. };
  364.  
  365.  
  366.  
  367. struct GetVolParmsInfoBuffer {
  368.     short                             vMVersion;                    /*version number*/
  369.     long                             vMAttrib;                    /*bit vector of attributes (see vMAttrib constants)*/
  370.     Handle                             vMLocalHand;                /*handle to private data*/
  371.     long                             vMServerAdr;                /*AppleTalk server address or zero*/
  372.     long                             vMVolumeGrade;                /*approx. speed rating or zero if unrated*/
  373.     short                             vMForeignPrivID;            /*foreign privilege model supported or zero if none*/
  374. };
  375. typedef struct GetVolParmsInfoBuffer    GetVolParmsInfoBuffer;
  376. typedef union ParamBlockRec             ParamBlockRec;
  377.  
  378. typedef ParamBlockRec *                    ParmBlkPtr;
  379. typedef CALLBACK_API( void , IOCompletionProcPtr )(ParmBlkPtr paramBlock);
  380. /*
  381.     WARNING: IOCompletionProcPtr uses register based parameters under classic 68k
  382.              and cannot be written in a high-level language without 
  383.              the help of mixed mode or assembly glue.
  384. */
  385. typedef REGISTER_UPP_TYPE(IOCompletionProcPtr)                     IOCompletionUPP;
  386.  
  387. struct IOParam {
  388.     QElemPtr                         qLink;                        /*queue link in header*/
  389.     short                             qType;                        /*type byte for safety check*/
  390.     short                             ioTrap;                        /*FS: the Trap*/
  391.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  392.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  393.     volatile OSErr                     ioResult;                    /*result code*/
  394.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  395.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  396.     short                             ioRefNum;                    /*refNum for I/O operation*/
  397.     SInt8                             ioVersNum;                    /*version number*/
  398.     SInt8                             ioPermssn;                    /*Open: permissions (byte)*/
  399.     Ptr                             ioMisc;                        /*Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type)*/
  400.     Ptr                             ioBuffer;                    /*data buffer Ptr*/
  401.     long                             ioReqCount;                    /*requested byte count; also = ioNewDirID*/
  402.     long                             ioActCount;                    /*actual byte count completed*/
  403.     short                             ioPosMode;                    /*initial file positioning*/
  404.     long                             ioPosOffset;                /*file position offset*/
  405. };
  406. typedef struct IOParam                    IOParam;
  407. typedef IOParam *                        IOParamPtr;
  408.  
  409. struct FileParam {
  410.     QElemPtr                         qLink;                        /*queue link in header*/
  411.     short                             qType;                        /*type byte for safety check*/
  412.     short                             ioTrap;                        /*FS: the Trap*/
  413.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  414.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  415.     volatile OSErr                     ioResult;                    /*result code*/
  416.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  417.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  418.     short                             ioFRefNum;                    /*reference number*/
  419.     SInt8                             ioFVersNum;                    /*version number*/
  420.     SInt8                             filler1;
  421.     short                             ioFDirIndex;                /*GetFInfo directory index*/
  422.     SInt8                             ioFlAttrib;                    /*GetFInfo: in-use bit=7, lock bit=0*/
  423.     SInt8                             ioFlVersNum;                /*file version number*/
  424.     FInfo                             ioFlFndrInfo;                /*user info*/
  425.     unsigned long                     ioFlNum;                    /*GetFInfo: file number; TF- ioDirID*/
  426.     unsigned short                     ioFlStBlk;                    /*start file block (0 if none)*/
  427.     long                             ioFlLgLen;                    /*logical length (EOF)*/
  428.     long                             ioFlPyLen;                    /*physical length*/
  429.     unsigned short                     ioFlRStBlk;                    /*start block rsrc fork*/
  430.     long                             ioFlRLgLen;                    /*file logical length rsrc fork*/
  431.     long                             ioFlRPyLen;                    /*file physical length rsrc fork*/
  432.     unsigned long                     ioFlCrDat;                    /*file creation date& time (32 bits in secs)*/
  433.     unsigned long                     ioFlMdDat;                    /*last modified date and time*/
  434. };
  435. typedef struct FileParam                FileParam;
  436. typedef FileParam *                        FileParamPtr;
  437.  
  438. struct VolumeParam {
  439.     QElemPtr                         qLink;                        /*queue link in header*/
  440.     short                             qType;                        /*type byte for safety check*/
  441.     short                             ioTrap;                        /*FS: the Trap*/
  442.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  443.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  444.     volatile OSErr                     ioResult;                    /*result code*/
  445.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  446.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  447.     long                             filler2;
  448.     short                             ioVolIndex;                    /*volume index number*/
  449.     unsigned long                     ioVCrDate;                    /*creation date and time*/
  450.     unsigned long                     ioVLsBkUp;                    /*last backup date and time*/
  451.     unsigned short                     ioVAtrb;                    /*volume attrib*/
  452.     unsigned short                     ioVNmFls;                    /*number of files in directory*/
  453.     unsigned short                     ioVDirSt;                    /*start block of file directory*/
  454.     short                             ioVBlLn;                    /*GetVolInfo: length of dir in blocks*/
  455.     unsigned short                     ioVNmAlBlks;                /*for compatibilty ioVNmAlBlks * ioVAlBlkSiz <= 2 GB*/
  456.     unsigned long                     ioVAlBlkSiz;                /*for compatibilty ioVAlBlkSiz is <= $0000FE00 (65,024)*/
  457.     unsigned long                     ioVClpSiz;                    /*GetVolInfo: bytes to allocate at a time*/
  458.     unsigned short                     ioAlBlSt;                    /*starting disk(512-byte) block in block map*/
  459.     unsigned long                     ioVNxtFNum;                    /*GetVolInfo: next free file number*/
  460.     unsigned short                     ioVFrBlk;                    /*GetVolInfo: # free alloc blks for this vol*/
  461. };
  462. typedef struct VolumeParam                VolumeParam;
  463. typedef VolumeParam *                    VolumeParamPtr;
  464.  
  465. struct CntrlParam {
  466.     QElemPtr                         qLink;                        /*queue link in header*/
  467.     short                             qType;                        /*type byte for safety check*/
  468.     short                             ioTrap;                        /*FS: the Trap*/
  469.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  470.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  471.     volatile OSErr                     ioResult;                    /*result code*/
  472.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  473.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  474.     short                             ioCRefNum;                    /*refNum for I/O operation*/
  475.     short                             csCode;                        /*word for control status code*/
  476.     short                             csParam[11];                /*operation-defined parameters*/
  477. };
  478. typedef struct CntrlParam                CntrlParam;
  479. typedef CntrlParam *                    CntrlParamPtr;
  480.  
  481. struct SlotDevParam {
  482.     QElemPtr                         qLink;                        /*queue link in header*/
  483.     short                             qType;                        /*type byte for safety check*/
  484.     short                             ioTrap;                        /*FS: the Trap*/
  485.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  486.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  487.     volatile OSErr                     ioResult;                    /*result code*/
  488.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  489.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  490.     short                             ioSRefNum;
  491.     SInt8                             ioSVersNum;
  492.     SInt8                             ioSPermssn;
  493.     Ptr                             ioSMix;
  494.     short                             ioSFlags;
  495.     SInt8                             ioSlot;
  496.     SInt8                             ioID;
  497. };
  498. typedef struct SlotDevParam                SlotDevParam;
  499. typedef SlotDevParam *                    SlotDevParamPtr;
  500.  
  501. struct MultiDevParam {
  502.     QElemPtr                         qLink;                        /*queue link in header*/
  503.     short                             qType;                        /*type byte for safety check*/
  504.     short                             ioTrap;                        /*FS: the Trap*/
  505.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  506.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  507.     volatile OSErr                     ioResult;                    /*result code*/
  508.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  509.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  510.     short                             ioMRefNum;
  511.     SInt8                             ioMVersNum;
  512.     SInt8                             ioMPermssn;
  513.     Ptr                             ioMMix;
  514.     short                             ioMFlags;
  515.     Ptr                             ioSEBlkPtr;
  516. };
  517. typedef struct MultiDevParam            MultiDevParam;
  518. typedef MultiDevParam *                    MultiDevParamPtr;
  519.  
  520. union ParamBlockRec {
  521.     IOParam                         ioParam;
  522.     FileParam                         fileParam;
  523.     VolumeParam                     volumeParam;
  524.     CntrlParam                         cntrlParam;
  525.     SlotDevParam                     slotDevParam;
  526.     MultiDevParam                     multiDevParam;
  527. };
  528.  
  529.  
  530. struct HFileInfo {
  531.     QElemPtr                         qLink;                        /*queue link in header*/
  532.     short                             qType;                        /*type byte for safety check*/
  533.     short                             ioTrap;                        /*FS: the Trap*/
  534.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  535.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  536.     volatile OSErr                     ioResult;                    /*result code*/
  537.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  538.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  539.     short                             ioFRefNum;
  540.     SInt8                             ioFVersNum;
  541.     SInt8                             filler1;
  542.     short                             ioFDirIndex;
  543.     SInt8                             ioFlAttrib;
  544.     SInt8                             ioACUser;
  545.     FInfo                             ioFlFndrInfo;
  546.     long                             ioDirID;
  547.     unsigned short                     ioFlStBlk;
  548.     long                             ioFlLgLen;
  549.     long                             ioFlPyLen;
  550.     unsigned short                     ioFlRStBlk;
  551.     long                             ioFlRLgLen;
  552.     long                             ioFlRPyLen;
  553.     unsigned long                     ioFlCrDat;
  554.     unsigned long                     ioFlMdDat;
  555.     unsigned long                     ioFlBkDat;
  556.     FXInfo                             ioFlXFndrInfo;
  557.     long                             ioFlParID;
  558.     long                             ioFlClpSiz;
  559. };
  560. typedef struct HFileInfo                HFileInfo;
  561.  
  562. struct DirInfo {
  563.     QElemPtr                         qLink;                        /*queue link in header*/
  564.     short                             qType;                        /*type byte for safety check*/
  565.     short                             ioTrap;                        /*FS: the Trap*/
  566.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  567.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  568.     volatile OSErr                     ioResult;                    /*result code*/
  569.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  570.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  571.     short                             ioFRefNum;
  572.     SInt8                             ioFVersNum;
  573.     SInt8                             filler1;
  574.     short                             ioFDirIndex;
  575.     SInt8                             ioFlAttrib;
  576.     SInt8                             ioACUser;
  577.     DInfo                             ioDrUsrWds;
  578.     long                             ioDrDirID;
  579.     unsigned short                     ioDrNmFls;
  580.     short                             filler3[9];
  581.     unsigned long                     ioDrCrDat;
  582.     unsigned long                     ioDrMdDat;
  583.     unsigned long                     ioDrBkDat;
  584.     DXInfo                             ioDrFndrInfo;
  585.     long                             ioDrParID;
  586. };
  587. typedef struct DirInfo                    DirInfo;
  588.  
  589. union CInfoPBRec {
  590.     HFileInfo                         hFileInfo;
  591.     DirInfo                         dirInfo;
  592. };
  593. typedef union CInfoPBRec                CInfoPBRec;
  594.  
  595. typedef CInfoPBRec *                    CInfoPBPtr;
  596.  
  597. struct XCInfoPBRec {
  598.     QElemPtr                         qLink;
  599.     short                             qType;
  600.     short                             ioTrap;
  601.     Ptr                             ioCmdAddr;
  602.     ProcPtr                         ioCompletion;                /* --> A pointer to a completion routine */
  603.     volatile OSErr                     ioResult;                    /* --> The result code of the function */
  604.     StringPtr                         ioNamePtr;                    /* --> Pointer to pathname to object */
  605.     short                             ioVRefNum;                    /* --> A volume specification */
  606.     long                             filler1;
  607.     StringPtr                         ioShortNamePtr;                /* <-> A pointer to the short name string buffer - required! */
  608.     short                             filler2;
  609.     short                             ioPDType;                    /* <-- The ProDOS file type */
  610.     long                             ioPDAuxType;                /* <-- The ProDOS aux type */
  611.     long                             filler3[2];
  612.     long                             ioDirID;                    /* --> A directory ID */
  613. };
  614. typedef struct XCInfoPBRec                XCInfoPBRec;
  615.  
  616. typedef XCInfoPBRec *                    XCInfoPBPtr;
  617. /* Catalog position record */
  618.  
  619. struct CatPositionRec {
  620.     long                             initialize;
  621.     short                             priv[6];
  622. };
  623. typedef struct CatPositionRec            CatPositionRec;
  624.  
  625. struct FSSpec {
  626.     short                             vRefNum;
  627.     long                             parID;
  628.     StrFileName                     name;                        /* a Str63 on MacOS*/
  629. };
  630. typedef struct FSSpec                    FSSpec;
  631. typedef FSSpec *                        FSSpecPtr;
  632. typedef FSSpecPtr *                        FSSpecHandle;
  633. /* pointer to array of FSSpecs */
  634. typedef FSSpecPtr                         FSSpecArrayPtr;
  635. /* 
  636.     The only difference between "const FSSpec*" and "ConstFSSpecPtr" is 
  637.     that as a parameter, ConstFSSpecPtr is allowed to be NULL 
  638. */
  639.  
  640. typedef const FSSpec *                    ConstFSSpecPtr;
  641. /* 
  642.     The following are structures to be filled out with the _PBGetVolMountInfo call
  643.     and passed back into the _PBVolumeMount call for external file system mounts. 
  644. */
  645. /* the "signature" of the file system */
  646. typedef OSType                             VolumeType;
  647. enum {
  648.                                                                 /* the signature for AppleShare */
  649.     AppleShareMediaType            = FOUR_CHAR_CODE('afpm')
  650. };
  651.  
  652. /*
  653.     VolMount stuff was once in FSM.≈
  654. */
  655.  
  656. struct VolMountInfoHeader {
  657.     short                             length;                        /* length of location data (including self) */
  658.     VolumeType                         media;                        /* type of media.  Variable length data follows */
  659. };
  660. typedef struct VolMountInfoHeader        VolMountInfoHeader;
  661.  
  662. typedef VolMountInfoHeader *            VolMountInfoPtr;
  663. /* The new volume mount info record.  The old one is included for compatibility. 
  664.     the new record allows access by foriegn filesystems writers to the flags 
  665.     portion of the record. This portion is now public.  
  666. */
  667.  
  668. struct VolumeMountInfoHeader {
  669.     short                             length;                        /* length of location data (including self) */
  670.     VolumeType                         media;                        /* type of media (must be registered with Apple) */
  671.     short                             flags;                        /* volume mount flags. Variable length data follows */
  672. };
  673. typedef struct VolumeMountInfoHeader    VolumeMountInfoHeader;
  674. typedef VolumeMountInfoHeader *            VolumeMountInfoHeaderPtr;
  675. /* volume mount flags */
  676. enum {
  677.     volMountNoLoginMsgFlagBit    = 0,                            /* Input to VolumeMount: If set, the file system */
  678.     volMountNoLoginMsgFlagMask    = 0x0001,                        /*  should suppresss any log-in message/greeting dialog */
  679.     volMountExtendedFlagsBit    = 7,                            /* Input to VolumeMount: If set, the mount info is a */
  680.     volMountExtendedFlagsMask    = 0x0080,                        /*  AFPXVolMountInfo record for 3.7 AppleShare Client */
  681.     volMountInteractBit            = 15,                            /* Input to VolumeMount: If set, it's OK for the file system */
  682.     volMountInteractMask        = 0x8000,                        /*  to perform user interaction to mount the volume */
  683.     volMountChangedBit            = 14,                            /* Output from VoumeMount: If set, the volume was mounted, but */
  684.     volMountChangedMask            = 0x4000,                        /*  the volume mounting information record needs to be updated. */
  685.     volMountFSReservedMask        = 0x00FF,                        /* bits 0-7 are defined by each file system for its own use */
  686.     volMountSysReservedMask        = 0xFF00                        /* bits 8-15 are reserved for Apple system use */
  687. };
  688.  
  689.  
  690.  
  691.  
  692. struct AFPVolMountInfo {
  693.     short                             length;                        /* length of location data (including self) */
  694.     VolumeType                         media;                        /* type of media */
  695.     short                             flags;                        /* bits for no messages, no reconnect */
  696.     SInt8                             nbpInterval;                /* NBP Interval parameter (IM2, p.322) */
  697.     SInt8                             nbpCount;                    /* NBP Interval parameter (IM2, p.322) */
  698.     short                             uamType;                    /* User Authentication Method */
  699.     short                             zoneNameOffset;                /* short positive offset from start of struct to Zone Name */
  700.     short                             serverNameOffset;            /* offset to pascal Server Name string */
  701.     short                             volNameOffset;                /* offset to pascal Volume Name string */
  702.     short                             userNameOffset;                /* offset to pascal User Name string */
  703.     short                             userPasswordOffset;            /* offset to pascal User Password string */
  704.     short                             volPasswordOffset;            /* offset to pascal Volume Password string */
  705.     char                             AFPData[144];                /* variable length data may follow */
  706. };
  707. typedef struct AFPVolMountInfo            AFPVolMountInfo;
  708. typedef AFPVolMountInfo *                AFPVolMountInfoPtr;
  709.  
  710.  
  711. /* AFPXVolMountInfo is the new AFP volume mount info record, requires the 3.7 AppleShare Client */
  712.  
  713. struct AFPXVolMountInfo {
  714.     short                             length;                        /* length of location data (including self) */
  715.     VolumeType                         media;                        /* type of media */
  716.     short                             flags;                        /* bits for no messages, no reconnect */
  717.     SInt8                             nbpInterval;                /* NBP Interval parameter (IM2, p.322) */
  718.     SInt8                             nbpCount;                    /* NBP Interval parameter (IM2, p.322) */
  719.     short                             uamType;                    /* User Authentication Method type */
  720.     short                             zoneNameOffset;                /* short positive offset from start of struct to Zone Name */
  721.     short                             serverNameOffset;            /* offset to pascal Server Name string */
  722.     short                             volNameOffset;                /* offset to pascal Volume Name string */
  723.     short                             userNameOffset;                /* offset to pascal User Name string */
  724.     short                             userPasswordOffset;            /* offset to pascal User Password string */
  725.     short                             volPasswordOffset;            /* offset to pascal Volume Password string */
  726.     short                             extendedFlags;                /* extended flags word */
  727.     short                             uamNameOffset;                /* offset to a pascal UAM name string */
  728.     short                             alternateAddressOffset;        /* offset to Alternate Addresses in tagged format */
  729.     char                             AFPData[176];                /* variable length data may follow */
  730. };
  731. typedef struct AFPXVolMountInfo            AFPXVolMountInfo;
  732. typedef AFPXVolMountInfo *                AFPXVolMountInfoPtr;
  733. enum {
  734.     kAFPExtendedFlagsAlternateAddressMask = 1                    /*  bit in AFPXVolMountInfo.extendedFlags that means alternateAddressOffset is used*/
  735. };
  736.  
  737.  
  738. enum {
  739.                                                                 /* constants for use in AFPTagData.fType field*/
  740.     kAFPTagTypeIP                = 0x01,
  741.     kAFPTagTypeIPPort            = 0x02,
  742.     kAFPTagTypeDDP                = 0x03                            /* Currently unused*/
  743. };
  744.  
  745.  
  746. enum {
  747.                                                                 /* constants for use in AFPTagData.fLength field*/
  748.     kAFPTagLengthIP                = 0x06,
  749.     kAFPTagLengthIPPort            = 0x08,
  750.     kAFPTagLengthDDP            = 0x06
  751. };
  752.  
  753.  
  754. struct AFPTagData {
  755.     UInt8                             fLength;                    /* length of this data tag including the fLength field */
  756.     UInt8                             fType;
  757.     UInt8                             fData[1];                    /* variable length data */
  758. };
  759. typedef struct AFPTagData                AFPTagData;
  760.  
  761. struct AFPAlternateAddress {
  762.     UInt8                             fAddressCount;
  763.     UInt8                             fAddressList[1];            /* actually variable length packed set of AFPTagData */
  764. };
  765. typedef struct AFPAlternateAddress        AFPAlternateAddress;
  766.  
  767.  
  768. struct DTPBRec {
  769.     QElemPtr                         qLink;                        /*queue link in header*/
  770.     short                             qType;                        /*type byte for safety check*/
  771.     short                             ioTrap;                        /*FS: the Trap*/
  772.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  773.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  774.     volatile OSErr                     ioResult;                    /*result code*/
  775.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  776.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  777.     short                             ioDTRefNum;                    /* desktop refnum */
  778.     short                             ioIndex;
  779.     long                             ioTagInfo;
  780.     Ptr                             ioDTBuffer;
  781.     long                             ioDTReqCount;
  782.     long                             ioDTActCount;
  783.     SInt8                             ioFiller1;
  784.     SInt8                             ioIconType;
  785.     short                             ioFiller2;
  786.     long                             ioDirID;
  787.     OSType                             ioFileCreator;
  788.     OSType                             ioFileType;
  789.     long                             ioFiller3;
  790.     long                             ioDTLgLen;
  791.     long                             ioDTPyLen;
  792.     short                             ioFiller4[14];
  793.     long                             ioAPPLParID;
  794. };
  795. typedef struct DTPBRec                    DTPBRec;
  796.  
  797. typedef DTPBRec *                        DTPBPtr;
  798.  
  799.  
  800. struct HIOParam {
  801.     QElemPtr                         qLink;                        /*queue link in header*/
  802.     short                             qType;                        /*type byte for safety check*/
  803.     short                             ioTrap;                        /*FS: the Trap*/
  804.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  805.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  806.     volatile OSErr                     ioResult;                    /*result code*/
  807.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  808.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  809.     short                             ioRefNum;
  810.     SInt8                             ioVersNum;
  811.     SInt8                             ioPermssn;
  812.     Ptr                             ioMisc;
  813.     Ptr                             ioBuffer;
  814.     long                             ioReqCount;
  815.     long                             ioActCount;
  816.     short                             ioPosMode;
  817.     long                             ioPosOffset;
  818. };
  819. typedef struct HIOParam                    HIOParam;
  820. typedef HIOParam *                        HIOParamPtr;
  821.  
  822. struct HFileParam {
  823.     QElemPtr                         qLink;                        /*queue link in header*/
  824.     short                             qType;                        /*type byte for safety check*/
  825.     short                             ioTrap;                        /*FS: the Trap*/
  826.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  827.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  828.     volatile OSErr                     ioResult;                    /*result code*/
  829.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  830.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  831.     short                             ioFRefNum;
  832.     SInt8                             ioFVersNum;
  833.     SInt8                             filler1;
  834.     short                             ioFDirIndex;
  835.     SInt8                             ioFlAttrib;
  836.     SInt8                             ioFlVersNum;
  837.     FInfo                             ioFlFndrInfo;
  838.     long                             ioDirID;
  839.     unsigned short                     ioFlStBlk;
  840.     long                             ioFlLgLen;
  841.     long                             ioFlPyLen;
  842.     unsigned short                     ioFlRStBlk;
  843.     long                             ioFlRLgLen;
  844.     long                             ioFlRPyLen;
  845.     unsigned long                     ioFlCrDat;
  846.     unsigned long                     ioFlMdDat;
  847. };
  848. typedef struct HFileParam                HFileParam;
  849. typedef HFileParam *                    HFileParamPtr;
  850.  
  851. struct HVolumeParam {
  852.     QElemPtr                         qLink;                        /*queue link in header*/
  853.     short                             qType;                        /*type byte for safety check*/
  854.     short                             ioTrap;                        /*FS: the Trap*/
  855.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  856.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  857.     volatile OSErr                     ioResult;                    /*result code*/
  858.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  859.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  860.     long                             filler2;
  861.     short                             ioVolIndex;
  862.     unsigned long                     ioVCrDate;
  863.     unsigned long                     ioVLsMod;
  864.     short                             ioVAtrb;
  865.     unsigned short                     ioVNmFls;
  866.     unsigned short                     ioVBitMap;
  867.     unsigned short                     ioAllocPtr;
  868.     unsigned short                     ioVNmAlBlks;
  869.     unsigned long                     ioVAlBlkSiz;
  870.     unsigned long                     ioVClpSiz;
  871.     unsigned short                     ioAlBlSt;
  872.     unsigned long                     ioVNxtCNID;
  873.     unsigned short                     ioVFrBlk;
  874.     unsigned short                     ioVSigWord;
  875.     short                             ioVDrvInfo;
  876.     short                             ioVDRefNum;
  877.     short                             ioVFSID;
  878.     unsigned long                     ioVBkUp;
  879.     short                             ioVSeqNum;
  880.     unsigned long                     ioVWrCnt;
  881.     unsigned long                     ioVFilCnt;
  882.     unsigned long                     ioVDirCnt;
  883.     long                             ioVFndrInfo[8];
  884. };
  885. typedef struct HVolumeParam                HVolumeParam;
  886. typedef HVolumeParam *                    HVolumeParamPtr;
  887.  
  888. struct XIOParam {
  889.     QElemPtr                         qLink;
  890.     short                             qType;
  891.     short                             ioTrap;
  892.     Ptr                             ioCmdAddr;
  893.     IOCompletionUPP                 ioCompletion;
  894.     volatile OSErr                     ioResult;
  895.     StringPtr                         ioNamePtr;
  896.     short                             ioVRefNum;
  897.     short                             ioRefNum;
  898.     SInt8                             ioVersNum;
  899.     SInt8                             ioPermssn;
  900.     Ptr                             ioMisc;
  901.     Ptr                             ioBuffer;
  902.     long                             ioReqCount;
  903.     long                             ioActCount;
  904.     short                             ioPosMode;                    /* must have kUseWidePositioning bit set */
  905.     wide                             ioWPosOffset;                /* wide positioning offset */
  906. };
  907. typedef struct XIOParam                    XIOParam;
  908. typedef XIOParam *                        XIOParamPtr;
  909.  
  910. struct XVolumeParam {
  911.     QElemPtr                         qLink;
  912.     short                             qType;
  913.     short                             ioTrap;
  914.     Ptr                             ioCmdAddr;
  915.     IOCompletionUPP                 ioCompletion;
  916.     volatile OSErr                     ioResult;
  917.     StringPtr                         ioNamePtr;
  918.     short                             ioVRefNum;
  919.     unsigned long                     ioXVersion;                    /* this XVolumeParam version (0) */
  920.     short                             ioVolIndex;
  921.     unsigned long                     ioVCrDate;
  922.     unsigned long                     ioVLsMod;
  923.     short                             ioVAtrb;
  924.     unsigned short                     ioVNmFls;
  925.     unsigned short                     ioVBitMap;
  926.     unsigned short                     ioAllocPtr;
  927.     unsigned short                     ioVNmAlBlks;
  928.     unsigned long                     ioVAlBlkSiz;
  929.     unsigned long                     ioVClpSiz;
  930.     unsigned short                     ioAlBlSt;
  931.     unsigned long                     ioVNxtCNID;
  932.     unsigned short                     ioVFrBlk;
  933.     unsigned short                     ioVSigWord;
  934.     short                             ioVDrvInfo;
  935.     short                             ioVDRefNum;
  936.     short                             ioVFSID;
  937.     unsigned long                     ioVBkUp;
  938.     short                             ioVSeqNum;
  939.     unsigned long                     ioVWrCnt;
  940.     unsigned long                     ioVFilCnt;
  941.     unsigned long                     ioVDirCnt;
  942.     long                             ioVFndrInfo[8];
  943.     UInt64                             ioVTotalBytes;                /* total number of bytes on volume */
  944.     UInt64                             ioVFreeBytes;                /* number of free bytes on volume */
  945. };
  946. typedef struct XVolumeParam                XVolumeParam;
  947. typedef XVolumeParam *                    XVolumeParamPtr;
  948.  
  949. struct AccessParam {
  950.     QElemPtr                         qLink;                        /*queue link in header*/
  951.     short                             qType;                        /*type byte for safety check*/
  952.     short                             ioTrap;                        /*FS: the Trap*/
  953.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  954.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  955.     volatile OSErr                     ioResult;                    /*result code*/
  956.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  957.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  958.     short                             filler3;
  959.     short                             ioDenyModes;                /*access rights data*/
  960.     short                             filler4;
  961.     SInt8                             filler5;
  962.     SInt8                             ioACUser;                    /*access rights for directory only*/
  963.     long                             filler6;
  964.     long                             ioACOwnerID;                /*owner ID*/
  965.     long                             ioACGroupID;                /*group ID*/
  966.     long                             ioACAccess;                    /*access rights*/
  967.     long                             ioDirID;
  968. };
  969. typedef struct AccessParam                AccessParam;
  970. typedef AccessParam *                    AccessParamPtr;
  971.  
  972. struct ObjParam {
  973.     QElemPtr                         qLink;                        /*queue link in header*/
  974.     short                             qType;                        /*type byte for safety check*/
  975.     short                             ioTrap;                        /*FS: the Trap*/
  976.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  977.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  978.     volatile OSErr                     ioResult;                    /*result code*/
  979.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  980.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  981.     short                             filler7;
  982.     short                             ioObjType;                    /*function code*/
  983.     StringPtr                         ioObjNamePtr;                /*ptr to returned creator/group name*/
  984.     long                             ioObjID;                    /*creator/group ID*/
  985. };
  986. typedef struct ObjParam                    ObjParam;
  987. typedef ObjParam *                        ObjParamPtr;
  988.  
  989. struct CopyParam {
  990.     QElemPtr                         qLink;                        /*queue link in header*/
  991.     short                             qType;                        /*type byte for safety check*/
  992.     short                             ioTrap;                        /*FS: the Trap*/
  993.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  994.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  995.     volatile OSErr                     ioResult;                    /*result code*/
  996.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  997.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  998.     short                             ioDstVRefNum;                /*destination vol identifier*/
  999.     short                             filler8;
  1000.     StringPtr                         ioNewName;                    /*ptr to destination pathname*/
  1001.     StringPtr                         ioCopyName;                    /*ptr to optional name*/
  1002.     long                             ioNewDirID;                    /*destination directory ID*/
  1003.     long                             filler14;
  1004.     long                             filler15;
  1005.     long                             ioDirID;
  1006. };
  1007. typedef struct CopyParam                CopyParam;
  1008. typedef CopyParam *                        CopyParamPtr;
  1009.  
  1010. struct WDParam {
  1011.     QElemPtr                         qLink;                        /*queue link in header*/
  1012.     short                             qType;                        /*type byte for safety check*/
  1013.     short                             ioTrap;                        /*FS: the Trap*/
  1014.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1015.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1016.     volatile OSErr                     ioResult;                    /*result code*/
  1017.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1018.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1019.     short                             filler9;
  1020.     short                             ioWDIndex;
  1021.     long                             ioWDProcID;
  1022.     short                             ioWDVRefNum;
  1023.     short                             filler10;
  1024.     long                             filler11;
  1025.     long                             filler12;
  1026.     long                             filler13;
  1027.     long                             ioWDDirID;
  1028. };
  1029. typedef struct WDParam                    WDParam;
  1030. typedef WDParam *                        WDParamPtr;
  1031.  
  1032. struct FIDParam {
  1033.     QElemPtr                         qLink;                        /*queue link in header*/
  1034.     short                             qType;                        /*type byte for safety check*/
  1035.     short                             ioTrap;                        /*FS: the Trap*/
  1036.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1037.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1038.     volatile OSErr                     ioResult;                    /*result code*/
  1039.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1040.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1041.     long                             filler14;
  1042.     StringPtr                         ioDestNamePtr;                /* dest file name */
  1043.     long                             filler15;
  1044.     long                             ioDestDirID;                /* dest file's directory id */
  1045.     long                             filler16;
  1046.     long                             filler17;
  1047.     long                             ioSrcDirID;                    /* source file's directory id */
  1048.     short                             filler18;
  1049.     long                             ioFileID;                    /* file ID */
  1050. };
  1051. typedef struct FIDParam                    FIDParam;
  1052. typedef FIDParam *                        FIDParamPtr;
  1053.  
  1054. struct ForeignPrivParam {
  1055.     QElemPtr                         qLink;                        /*queue link in header*/
  1056.     short                             qType;                        /*type byte for safety check*/
  1057.     short                             ioTrap;                        /*FS: the Trap*/
  1058.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1059.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1060.     volatile OSErr                     ioResult;                    /*result code*/
  1061.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1062.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1063.     long                             ioFiller21;
  1064.     long                             ioFiller22;
  1065.     Ptr                             ioForeignPrivBuffer;
  1066.     long                             ioForeignPrivActCount;
  1067.     long                             ioForeignPrivReqCount;
  1068.     long                             ioFiller23;
  1069.     long                             ioForeignPrivDirID;
  1070.     long                             ioForeignPrivInfo1;
  1071.     long                             ioForeignPrivInfo2;
  1072.     long                             ioForeignPrivInfo3;
  1073.     long                             ioForeignPrivInfo4;
  1074. };
  1075. typedef struct ForeignPrivParam            ForeignPrivParam;
  1076. typedef ForeignPrivParam *                ForeignPrivParamPtr;
  1077.  
  1078. struct CSParam {
  1079.     QElemPtr                         qLink;                        /*queue link in header*/
  1080.     short                             qType;                        /*type byte for safety check*/
  1081.     short                             ioTrap;                        /*FS: the Trap*/
  1082.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  1083.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  1084.     volatile OSErr                     ioResult;                    /*result code*/
  1085.     StringPtr                         ioNamePtr;                    /*ptr to Vol:FileName string*/
  1086.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  1087.     FSSpecPtr                         ioMatchPtr;                    /* match array */
  1088.     long                             ioReqMatchCount;            /* maximum allowable matches */
  1089.     long                             ioActMatchCount;            /* actual match count */
  1090.     long                             ioSearchBits;                /* search criteria selector */
  1091.     CInfoPBPtr                         ioSearchInfo1;                /* search values and range lower bounds */
  1092.     CInfoPBPtr                         ioSearchInfo2;                /* search values and range upper bounds */
  1093.     long                             ioSearchTime;                /* length of time to run search */
  1094.     CatPositionRec                     ioCatPosition;                /* current position in the catalog */
  1095.     Ptr                             ioOptBuffer;                /* optional performance enhancement buffer */
  1096.     long                             ioOptBufSize;                /* size of buffer pointed to by ioOptBuffer */
  1097. };
  1098. typedef struct CSParam                    CSParam;
  1099. typedef CSParam *                        CSParamPtr;
  1100.  
  1101. union HParamBlockRec {
  1102.     HIOParam                         ioParam;
  1103.     HFileParam                         fileParam;
  1104.     HVolumeParam                     volumeParam;
  1105.     AccessParam                     accessParam;
  1106.     ObjParam                         objParam;
  1107.     CopyParam                         copyParam;
  1108.     WDParam                         wdParam;
  1109.     FIDParam                         fidParam;
  1110.     CSParam                         csParam;
  1111.     ForeignPrivParam                 foreignPrivParam;
  1112. };
  1113. typedef union HParamBlockRec            HParamBlockRec;
  1114.  
  1115.  
  1116.  
  1117. typedef HParamBlockRec *                HParmBlkPtr;
  1118.  
  1119.  
  1120. struct CMovePBRec {
  1121.     QElemPtr                         qLink;
  1122.     short                             qType;
  1123.     short                             ioTrap;
  1124.     Ptr                             ioCmdAddr;
  1125.     IOCompletionUPP                 ioCompletion;
  1126.     volatile OSErr                     ioResult;
  1127.     StringPtr                         ioNamePtr;
  1128.     short                             ioVRefNum;
  1129.     long                             filler1;
  1130.     StringPtr                         ioNewName;
  1131.     long                             filler2;
  1132.     long                             ioNewDirID;
  1133.     long                             filler3[2];
  1134.     long                             ioDirID;
  1135. };
  1136. typedef struct CMovePBRec                CMovePBRec;
  1137.  
  1138. typedef CMovePBRec *                    CMovePBPtr;
  1139.  
  1140. struct WDPBRec {
  1141.     QElemPtr                         qLink;
  1142.     short                             qType;
  1143.     short                             ioTrap;
  1144.     Ptr                             ioCmdAddr;
  1145.     IOCompletionUPP                 ioCompletion;
  1146.     volatile OSErr                     ioResult;
  1147.     StringPtr                         ioNamePtr;
  1148.     short                             ioVRefNum;
  1149.     short                             filler1;
  1150.     short                             ioWDIndex;
  1151.     long                             ioWDProcID;
  1152.     short                             ioWDVRefNum;
  1153.     short                             filler2[7];
  1154.     long                             ioWDDirID;
  1155. };
  1156. typedef struct WDPBRec                    WDPBRec;
  1157.  
  1158. typedef WDPBRec *                        WDPBPtr;
  1159.  
  1160. struct FCBPBRec {
  1161.     QElemPtr                         qLink;
  1162.     short                             qType;
  1163.     short                             ioTrap;
  1164.     Ptr                             ioCmdAddr;
  1165.     IOCompletionUPP                 ioCompletion;
  1166.     volatile OSErr                     ioResult;
  1167.     StringPtr                         ioNamePtr;
  1168.     short                             ioVRefNum;
  1169.     short                             ioRefNum;
  1170.     short                             filler;
  1171.     short                             ioFCBIndx;
  1172.     short                             filler1;
  1173.     long                             ioFCBFlNm;
  1174.     short                             ioFCBFlags;
  1175.     unsigned short                     ioFCBStBlk;
  1176.     long                             ioFCBEOF;
  1177.     long                             ioFCBPLen;
  1178.     long                             ioFCBCrPs;
  1179.     short                             ioFCBVRefNum;
  1180.     long                             ioFCBClpSiz;
  1181.     long                             ioFCBParID;
  1182. };
  1183. typedef struct FCBPBRec                    FCBPBRec;
  1184.  
  1185. typedef FCBPBRec *                        FCBPBPtr;
  1186.  
  1187. struct VCB {
  1188.     QElemPtr                         qLink;
  1189.     short                             qType;
  1190.     short                             vcbFlags;
  1191.     unsigned short                     vcbSigWord;
  1192.     unsigned long                     vcbCrDate;
  1193.     unsigned long                     vcbLsMod;
  1194.     short                             vcbAtrb;
  1195.     unsigned short                     vcbNmFls;
  1196.     short                             vcbVBMSt;
  1197.     short                             vcbAllocPtr;
  1198.     unsigned short                     vcbNmAlBlks;
  1199.     long                             vcbAlBlkSiz;
  1200.     long                             vcbClpSiz;
  1201.     short                             vcbAlBlSt;
  1202.     long                             vcbNxtCNID;
  1203.     unsigned short                     vcbFreeBks;
  1204.     Str27                             vcbVN;
  1205.     short                             vcbDrvNum;
  1206.     short                             vcbDRefNum;
  1207.     short                             vcbFSID;
  1208.     short                             vcbVRefNum;
  1209.     Ptr                             vcbMAdr;
  1210.     Ptr                             vcbBufAdr;
  1211.     short                             vcbMLen;
  1212.     short                             vcbDirIndex;
  1213.     short                             vcbDirBlk;
  1214.     unsigned long                     vcbVolBkUp;
  1215.     unsigned short                     vcbVSeqNum;
  1216.     long                             vcbWrCnt;
  1217.     long                             vcbXTClpSiz;
  1218.     long                             vcbCTClpSiz;
  1219.     unsigned short                     vcbNmRtDirs;
  1220.     long                             vcbFilCnt;
  1221.     long                             vcbDirCnt;
  1222.     long                             vcbFndrInfo[8];
  1223.     unsigned short                     vcbVCSize;
  1224.     unsigned short                     vcbVBMCSiz;
  1225.     unsigned short                     vcbCtlCSiz;
  1226.     unsigned short                     vcbXTAlBlks;
  1227.     unsigned short                     vcbCTAlBlks;
  1228.     short                             vcbXTRef;
  1229.     short                             vcbCTRef;
  1230.     Ptr                             vcbCtlBuf;
  1231.     long                             vcbDirIDM;
  1232.     short                             vcbOffsM;
  1233. };
  1234. typedef struct VCB                        VCB;
  1235. typedef VCB *                            VCBPtr;
  1236.  
  1237. struct DrvQEl {
  1238.     QElemPtr                         qLink;
  1239.     short                             qType;
  1240.     short                             dQDrive;
  1241.     short                             dQRefNum;
  1242.     short                             dQFSID;
  1243.     unsigned short                     dQDrvSz;
  1244.     unsigned short                     dQDrvSz2;
  1245. };
  1246. typedef struct DrvQEl                    DrvQEl;
  1247. typedef DrvQEl *                        DrvQElPtr;
  1248. #if OPAQUE_UPP_TYPES
  1249.     EXTERN_API(IOCompletionUPP)
  1250.     NewIOCompletionUPP               (IOCompletionProcPtr        userRoutine);
  1251.  
  1252.     EXTERN_API(void)
  1253.     DisposeIOCompletionUPP           (IOCompletionUPP            userUPP);
  1254.  
  1255.     EXTERN_API(void)
  1256.     InvokeIOCompletionUPP           (ParmBlkPtr                paramBlock,
  1257.                                     IOCompletionUPP            userUPP);
  1258.  
  1259. #else
  1260.     enum { uppIOCompletionProcInfo = 0x00009802 };                     /* register no_return_value Func(4_bytes:A0) */
  1261.     #define NewIOCompletionUPP(userRoutine)                         (IOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIOCompletionProcInfo, GetCurrentArchitecture())
  1262.     #define DisposeIOCompletionUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  1263.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1264.     #pragma parameter InvokeIOCompletionUPP(__A0, __A1)
  1265.     void InvokeIOCompletionUPP(ParmBlkPtr paramBlock, IOCompletionUPP userUPP) = 0x4E91;
  1266.     #else
  1267.         #define InvokeIOCompletionUPP(paramBlock, userUPP)                 CALL_ONE_PARAMETER_UPP((userUPP), uppIOCompletionProcInfo, (paramBlock))
  1268.     #endif
  1269. #endif
  1270. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  1271. #define NewIOCompletionProc(userRoutine)                         NewIOCompletionUPP(userRoutine)
  1272. #define CallIOCompletionProc(userRoutine, paramBlock)            InvokeIOCompletionUPP(paramBlock, userRoutine)
  1273.  
  1274. /*
  1275.    PBOpenSync(), PBOpenAsync(), PBOpenImmed() were moved to Devices.h
  1276.    PBCloseSync(), PBCloseAsync(), PBCloseImmed() were moved to Devices.h
  1277.    PBReadSync(), PBReadAsync(), PBReadImmed() were moved to Devices.h
  1278.    PBWriteSync(), PBWriteAsync(), PBWriteImmed() were moved to Devices.h
  1279. */
  1280.  
  1281.  
  1282.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1283.                                                                                             #pragma parameter __D0 PBGetVInfoSync(__A0)
  1284.                                                                                             #endif
  1285. EXTERN_API( OSErr ) PBGetVInfoSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA007);
  1286.  
  1287. #if CALL_NOT_IN_CARBON
  1288.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1289.                                                                                             #pragma parameter __D0 PBGetVInfoAsync(__A0)
  1290.                                                                                             #endif
  1291. EXTERN_API( OSErr ) PBGetVInfoAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA407);
  1292.  
  1293. #endif  /* CALL_NOT_IN_CARBON */
  1294.  
  1295.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1296.                                                                                             #pragma parameter __D0 PBXGetVolInfoSync(__A0)
  1297.                                                                                             #endif
  1298. EXTERN_API( OSErr ) PBXGetVolInfoSync(XVolumeParamPtr paramBlock)                            TWOWORDINLINE(0x7012, 0xA060);
  1299.  
  1300.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1301.                                                                                             #pragma parameter __D0 PBXGetVolInfoAsync(__A0)
  1302.                                                                                             #endif
  1303. EXTERN_API( OSErr ) PBXGetVolInfoAsync(XVolumeParamPtr paramBlock)                            TWOWORDINLINE(0x7012, 0xA460);
  1304.  
  1305. #if CALL_NOT_IN_CARBON
  1306.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1307.                                                                                             #pragma parameter __D0 PBGetVolSync(__A0)
  1308.                                                                                             #endif
  1309. EXTERN_API( OSErr ) PBGetVolSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA014);
  1310.  
  1311. #endif  /* CALL_NOT_IN_CARBON */
  1312.  
  1313. #if CALL_NOT_IN_CARBON
  1314.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1315.                                                                                             #pragma parameter __D0 PBGetVolAsync(__A0)
  1316.                                                                                             #endif
  1317. EXTERN_API( OSErr ) PBGetVolAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA414);
  1318.  
  1319. #endif  /* CALL_NOT_IN_CARBON */
  1320.  
  1321. #if CALL_NOT_IN_CARBON
  1322.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1323.                                                                                             #pragma parameter __D0 PBSetVolSync(__A0)
  1324.                                                                                             #endif
  1325. EXTERN_API( OSErr ) PBSetVolSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA015);
  1326.  
  1327. #endif  /* CALL_NOT_IN_CARBON */
  1328.  
  1329. #if CALL_NOT_IN_CARBON
  1330.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1331.                                                                                             #pragma parameter __D0 PBSetVolAsync(__A0)
  1332.                                                                                             #endif
  1333. EXTERN_API( OSErr ) PBSetVolAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA415);
  1334.  
  1335. #endif  /* CALL_NOT_IN_CARBON */
  1336.  
  1337.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1338.                                                                                             #pragma parameter __D0 PBFlushVolSync(__A0)
  1339.                                                                                             #endif
  1340. EXTERN_API( OSErr ) PBFlushVolSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA013);
  1341.  
  1342.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1343.                                                                                             #pragma parameter __D0 PBFlushVolAsync(__A0)
  1344.                                                                                             #endif
  1345. EXTERN_API( OSErr ) PBFlushVolAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA413);
  1346.  
  1347.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1348.                                                                                             #pragma parameter __D0 PBHTrashVolumeCachesSync(__A0)
  1349.                                                                                             #endif
  1350. EXTERN_API( OSErr ) PBHTrashVolumeCachesSync(ParmBlkPtr paramBlock)                            ONEWORDINLINE(0xA213);
  1351.  
  1352. #if CALL_NOT_IN_CARBON
  1353.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1354.                                                                                             #pragma parameter __D0 PBCreateSync(__A0)
  1355.                                                                                             #endif
  1356. EXTERN_API( OSErr ) PBCreateSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA008);
  1357.  
  1358. #endif  /* CALL_NOT_IN_CARBON */
  1359.  
  1360. #if CALL_NOT_IN_CARBON
  1361.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1362.                                                                                             #pragma parameter __D0 PBCreateAsync(__A0)
  1363.                                                                                             #endif
  1364. EXTERN_API( OSErr ) PBCreateAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA408);
  1365.  
  1366. #endif  /* CALL_NOT_IN_CARBON */
  1367.  
  1368. #if CALL_NOT_IN_CARBON
  1369.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1370.                                                                                             #pragma parameter __D0 PBDeleteSync(__A0)
  1371.                                                                                             #endif
  1372. EXTERN_API( OSErr ) PBDeleteSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA009);
  1373.  
  1374. #endif  /* CALL_NOT_IN_CARBON */
  1375.  
  1376. #if CALL_NOT_IN_CARBON
  1377.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1378.                                                                                             #pragma parameter __D0 PBDeleteAsync(__A0)
  1379.                                                                                             #endif
  1380. EXTERN_API( OSErr ) PBDeleteAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA409);
  1381.  
  1382. #endif  /* CALL_NOT_IN_CARBON */
  1383.  
  1384. #if CALL_NOT_IN_CARBON
  1385.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1386.                                                                                             #pragma parameter __D0 PBOpenDFSync(__A0)
  1387.                                                                                             #endif
  1388. EXTERN_API( OSErr ) PBOpenDFSync(ParmBlkPtr paramBlock)                                        TWOWORDINLINE(0x701A, 0xA060);
  1389.  
  1390. #endif  /* CALL_NOT_IN_CARBON */
  1391.  
  1392. #if CALL_NOT_IN_CARBON
  1393.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1394.                                                                                             #pragma parameter __D0 PBOpenDFAsync(__A0)
  1395.                                                                                             #endif
  1396. EXTERN_API( OSErr ) PBOpenDFAsync(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x701A, 0xA460);
  1397.  
  1398. #endif  /* CALL_NOT_IN_CARBON */
  1399.  
  1400. #if CALL_NOT_IN_CARBON
  1401.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1402.                                                                                             #pragma parameter __D0 PBOpenRFSync(__A0)
  1403.                                                                                             #endif
  1404. EXTERN_API( OSErr ) PBOpenRFSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00A);
  1405.  
  1406. #endif  /* CALL_NOT_IN_CARBON */
  1407.  
  1408. #if CALL_NOT_IN_CARBON
  1409.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1410.                                                                                             #pragma parameter __D0 PBOpenRFAsync(__A0)
  1411.                                                                                             #endif
  1412. EXTERN_API( OSErr ) PBOpenRFAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40A);
  1413.  
  1414. #endif  /* CALL_NOT_IN_CARBON */
  1415.  
  1416. #if CALL_NOT_IN_CARBON
  1417.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1418.                                                                                             #pragma parameter __D0 PBRenameSync(__A0)
  1419.                                                                                             #endif
  1420. EXTERN_API( OSErr ) PBRenameSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00B);
  1421.  
  1422. #endif  /* CALL_NOT_IN_CARBON */
  1423.  
  1424. #if CALL_NOT_IN_CARBON
  1425.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1426.                                                                                             #pragma parameter __D0 PBRenameAsync(__A0)
  1427.                                                                                             #endif
  1428. EXTERN_API( OSErr ) PBRenameAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40B);
  1429.  
  1430. #endif  /* CALL_NOT_IN_CARBON */
  1431.  
  1432.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1433.                                                                                             #pragma parameter __D0 PBGetFInfoSync(__A0)
  1434.                                                                                             #endif
  1435. EXTERN_API( OSErr ) PBGetFInfoSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA00C);
  1436.  
  1437.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1438.                                                                                             #pragma parameter __D0 PBGetFInfoAsync(__A0)
  1439.                                                                                             #endif
  1440. EXTERN_API( OSErr ) PBGetFInfoAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40C);
  1441.  
  1442.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1443.                                                                                             #pragma parameter __D0 PBSetFInfoSync(__A0)
  1444.                                                                                             #endif
  1445. EXTERN_API( OSErr ) PBSetFInfoSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA00D);
  1446.  
  1447.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1448.                                                                                             #pragma parameter __D0 PBSetFInfoAsync(__A0)
  1449.                                                                                             #endif
  1450. EXTERN_API( OSErr ) PBSetFInfoAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA40D);
  1451.  
  1452. #if CALL_NOT_IN_CARBON
  1453.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1454.                                                                                             #pragma parameter __D0 PBSetFLockSync(__A0)
  1455.                                                                                             #endif
  1456. EXTERN_API( OSErr ) PBSetFLockSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA041);
  1457.  
  1458. #endif  /* CALL_NOT_IN_CARBON */
  1459.  
  1460. #if CALL_NOT_IN_CARBON
  1461.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1462.                                                                                             #pragma parameter __D0 PBSetFLockAsync(__A0)
  1463.                                                                                             #endif
  1464. EXTERN_API( OSErr ) PBSetFLockAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA441);
  1465.  
  1466. #endif  /* CALL_NOT_IN_CARBON */
  1467.  
  1468. #if CALL_NOT_IN_CARBON
  1469.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1470.                                                                                             #pragma parameter __D0 PBRstFLockSync(__A0)
  1471.                                                                                             #endif
  1472. EXTERN_API( OSErr ) PBRstFLockSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA042);
  1473.  
  1474. #endif  /* CALL_NOT_IN_CARBON */
  1475.  
  1476. #if CALL_NOT_IN_CARBON
  1477.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1478.                                                                                             #pragma parameter __D0 PBRstFLockAsync(__A0)
  1479.                                                                                             #endif
  1480. EXTERN_API( OSErr ) PBRstFLockAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA442);
  1481.  
  1482. #endif  /* CALL_NOT_IN_CARBON */
  1483.  
  1484. #if CALL_NOT_IN_CARBON
  1485.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1486.                                                                                             #pragma parameter __D0 PBSetFVersSync(__A0)
  1487.                                                                                             #endif
  1488. EXTERN_API( OSErr ) PBSetFVersSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA043);
  1489.  
  1490. #endif  /* CALL_NOT_IN_CARBON */
  1491.  
  1492. #if CALL_NOT_IN_CARBON
  1493.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1494.                                                                                             #pragma parameter __D0 PBSetFVersAsync(__A0)
  1495.                                                                                             #endif
  1496. EXTERN_API( OSErr ) PBSetFVersAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA443);
  1497.  
  1498. #endif  /* CALL_NOT_IN_CARBON */
  1499.  
  1500.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1501.                                                                                             #pragma parameter __D0 PBAllocateSync(__A0)
  1502.                                                                                             #endif
  1503. EXTERN_API( OSErr ) PBAllocateSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA010);
  1504.  
  1505.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1506.                                                                                             #pragma parameter __D0 PBAllocateAsync(__A0)
  1507.                                                                                             #endif
  1508. EXTERN_API( OSErr ) PBAllocateAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA410);
  1509.  
  1510.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1511.                                                                                             #pragma parameter __D0 PBGetEOFSync(__A0)
  1512.                                                                                             #endif
  1513. EXTERN_API( OSErr ) PBGetEOFSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA011);
  1514.  
  1515.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1516.                                                                                             #pragma parameter __D0 PBGetEOFAsync(__A0)
  1517.                                                                                             #endif
  1518. EXTERN_API( OSErr ) PBGetEOFAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA411);
  1519.  
  1520.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1521.                                                                                             #pragma parameter __D0 PBSetEOFSync(__A0)
  1522.                                                                                             #endif
  1523. EXTERN_API( OSErr ) PBSetEOFSync(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA012);
  1524.  
  1525.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1526.                                                                                             #pragma parameter __D0 PBSetEOFAsync(__A0)
  1527.                                                                                             #endif
  1528. EXTERN_API( OSErr ) PBSetEOFAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA412);
  1529.  
  1530.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1531.                                                                                             #pragma parameter __D0 PBGetFPosSync(__A0)
  1532.                                                                                             #endif
  1533. EXTERN_API( OSErr ) PBGetFPosSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA018);
  1534.  
  1535.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1536.                                                                                             #pragma parameter __D0 PBGetFPosAsync(__A0)
  1537.                                                                                             #endif
  1538. EXTERN_API( OSErr ) PBGetFPosAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA418);
  1539.  
  1540.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1541.                                                                                             #pragma parameter __D0 PBSetFPosSync(__A0)
  1542.                                                                                             #endif
  1543. EXTERN_API( OSErr ) PBSetFPosSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA044);
  1544.  
  1545.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1546.                                                                                             #pragma parameter __D0 PBSetFPosAsync(__A0)
  1547.                                                                                             #endif
  1548. EXTERN_API( OSErr ) PBSetFPosAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA444);
  1549.  
  1550.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1551.                                                                                             #pragma parameter __D0 PBFlushFileSync(__A0)
  1552.                                                                                             #endif
  1553. EXTERN_API( OSErr ) PBFlushFileSync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA045);
  1554.  
  1555.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1556.                                                                                             #pragma parameter __D0 PBFlushFileAsync(__A0)
  1557.                                                                                             #endif
  1558. EXTERN_API( OSErr ) PBFlushFileAsync(ParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA445);
  1559.  
  1560.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1561.                                                                                             #pragma parameter __D0 PBMountVol(__A0)
  1562.                                                                                             #endif
  1563. EXTERN_API( OSErr ) PBMountVol(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00F);
  1564.  
  1565.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1566.                                                                                             #pragma parameter __D0 PBUnmountVol(__A0)
  1567.                                                                                             #endif
  1568. EXTERN_API( OSErr ) PBUnmountVol(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA00E);
  1569.  
  1570.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1571.                                                                                             #pragma parameter __D0 PBUnmountVolImmed(__A0)
  1572.                                                                                             #endif
  1573. EXTERN_API( OSErr ) PBUnmountVolImmed(ParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA20E);
  1574.  
  1575.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1576.                                                                                             #pragma parameter __D0 PBEject(__A0)
  1577.                                                                                             #endif
  1578. EXTERN_API( OSErr ) PBEject(ParmBlkPtr paramBlock)                                            ONEWORDINLINE(0xA017);
  1579.  
  1580.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1581.                                                                                             #pragma parameter __D0 PBOffLine(__A0)
  1582.                                                                                             #endif
  1583. EXTERN_API( OSErr ) PBOffLine(ParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA035);
  1584.  
  1585.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1586.                                                                                             #pragma parameter __D0 PBCatSearchSync(__A0)
  1587.                                                                                             #endif
  1588. EXTERN_API( OSErr ) PBCatSearchSync(CSParamPtr paramBlock)                                    TWOWORDINLINE(0x7018, 0xA260);
  1589.  
  1590.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1591.                                                                                             #pragma parameter __D0 PBCatSearchAsync(__A0)
  1592.                                                                                             #endif
  1593. EXTERN_API( OSErr ) PBCatSearchAsync(CSParamPtr paramBlock)                                    TWOWORDINLINE(0x7018, 0xA660);
  1594.  
  1595. EXTERN_API( OSErr )
  1596. SetVol                            (ConstStr63Param         volName, /* can be NULL */
  1597.                                  short                     vRefNum);
  1598.  
  1599. EXTERN_API( OSErr )
  1600. UnmountVol                        (ConstStr63Param         volName, /* can be NULL */
  1601.                                  short                     vRefNum);
  1602.  
  1603. EXTERN_API( OSErr )
  1604. Eject                            (ConstStr63Param         volName, /* can be NULL */
  1605.                                  short                     vRefNum);
  1606.  
  1607. EXTERN_API( OSErr )
  1608. FlushVol                        (ConstStr63Param         volName, /* can be NULL */
  1609.                                  short                     vRefNum);
  1610.  
  1611. EXTERN_API( OSErr )
  1612. HSetVol                            (ConstStr63Param         volName, /* can be NULL */
  1613.                                  short                     vRefNum,
  1614.                                  long                     dirID);
  1615.  
  1616. /* AddDrive() was moved to Devices.h*/
  1617.  
  1618. EXTERN_API( OSErr )
  1619. FSOpen                            (ConstStr255Param         fileName,
  1620.                                  short                     vRefNum,
  1621.                                  short *                refNum);
  1622.  
  1623. #if CALL_NOT_IN_CARBON
  1624. EXTERN_API( OSErr )
  1625. OpenDF                            (ConstStr255Param         fileName,
  1626.                                  short                     vRefNum,
  1627.                                  short *                refNum);
  1628.  
  1629. #endif  /* CALL_NOT_IN_CARBON */
  1630.  
  1631. EXTERN_API( OSErr )
  1632. FSClose                            (short                     refNum);
  1633.  
  1634. EXTERN_API( OSErr )
  1635. FSRead                            (short                     refNum,
  1636.                                  long *                    count,
  1637.                                  void *                    buffPtr);
  1638.  
  1639. EXTERN_API( OSErr )
  1640. FSWrite                            (short                     refNum,
  1641.                                  long *                    count,
  1642.                                  const void *            buffPtr);
  1643.  
  1644. #if CALL_NOT_IN_CARBON
  1645. EXTERN_API( OSErr )
  1646. GetVInfo                        (short                     drvNum,
  1647.                                  StringPtr                 volName,
  1648.                                  short *                vRefNum,
  1649.                                  long *                    freeBytes);
  1650.  
  1651. #endif  /* CALL_NOT_IN_CARBON */
  1652.  
  1653. #if CALL_NOT_IN_CARBON
  1654. EXTERN_API( OSErr )
  1655. GetFInfo                        (ConstStr255Param         fileName,
  1656.                                  short                     vRefNum,
  1657.                                  FInfo *                fndrInfo);
  1658.  
  1659. #endif  /* CALL_NOT_IN_CARBON */
  1660.  
  1661. EXTERN_API( OSErr )
  1662. GetVol                            (StringPtr                 volName,
  1663.                                  short *                vRefNum);
  1664.  
  1665. #if CALL_NOT_IN_CARBON
  1666. EXTERN_API( OSErr )
  1667. Create                            (ConstStr255Param         fileName,
  1668.                                  short                     vRefNum,
  1669.                                  OSType                 creator,
  1670.                                  OSType                 fileType);
  1671.  
  1672. #endif  /* CALL_NOT_IN_CARBON */
  1673.  
  1674. EXTERN_API( OSErr )
  1675. FSDelete                        (ConstStr255Param         fileName,
  1676.                                  short                     vRefNum);
  1677.  
  1678. #if CALL_NOT_IN_CARBON
  1679. EXTERN_API( OSErr )
  1680. OpenRF                            (ConstStr255Param         fileName,
  1681.                                  short                     vRefNum,
  1682.                                  short *                refNum);
  1683.  
  1684. #endif  /* CALL_NOT_IN_CARBON */
  1685.  
  1686. #if CALL_NOT_IN_CARBON
  1687. EXTERN_API( OSErr )
  1688. Rename                            (ConstStr255Param         oldName,
  1689.                                  short                     vRefNum,
  1690.                                  ConstStr255Param         newName);
  1691.  
  1692. #endif  /* CALL_NOT_IN_CARBON */
  1693.  
  1694. #if CALL_NOT_IN_CARBON
  1695. EXTERN_API( OSErr )
  1696. SetFInfo                        (ConstStr255Param         fileName,
  1697.                                  short                     vRefNum,
  1698.                                  const FInfo *            fndrInfo);
  1699.  
  1700. #endif  /* CALL_NOT_IN_CARBON */
  1701.  
  1702. #if CALL_NOT_IN_CARBON
  1703. EXTERN_API( OSErr )
  1704. SetFLock                        (ConstStr255Param         fileName,
  1705.                                  short                     vRefNum);
  1706.  
  1707. #endif  /* CALL_NOT_IN_CARBON */
  1708.  
  1709. #if CALL_NOT_IN_CARBON
  1710. EXTERN_API( OSErr )
  1711. RstFLock                        (ConstStr255Param         fileName,
  1712.                                  short                     vRefNum);
  1713.  
  1714. #endif  /* CALL_NOT_IN_CARBON */
  1715.  
  1716. EXTERN_API( OSErr )
  1717. Allocate                        (short                     refNum,
  1718.                                  long *                    count);
  1719.  
  1720. EXTERN_API( OSErr )
  1721. GetEOF                            (short                     refNum,
  1722.                                  long *                    logEOF);
  1723.  
  1724. EXTERN_API( OSErr )
  1725. SetEOF                            (short                     refNum,
  1726.                                  long                     logEOF);
  1727.  
  1728. EXTERN_API( OSErr )
  1729. GetFPos                            (short                     refNum,
  1730.                                  long *                    filePos);
  1731.  
  1732. EXTERN_API( OSErr )
  1733. SetFPos                            (short                     refNum,
  1734.                                  short                     posMode,
  1735.                                  long                     posOff);
  1736.  
  1737. EXTERN_API( OSErr )
  1738. GetVRefNum                        (short                     fileRefNum,
  1739.                                  short *                vRefNum);
  1740.  
  1741. EXTERN_API_C( OSErr )
  1742. fsopen                            (const char *            fileName,
  1743.                                  short                     vRefNum,
  1744.                                  short *                refNum);
  1745.  
  1746. EXTERN_API_C( OSErr )
  1747. getvinfo                        (short                     drvNum,
  1748.                                  char *                    volName,
  1749.                                  short *                vRefNum,
  1750.                                  long *                    freeBytes);
  1751.  
  1752. EXTERN_API_C( OSErr )
  1753. getfinfo                        (const char *            fileName,
  1754.                                  short                     vRefNum,
  1755.                                  FInfo *                fndrInfo);
  1756.  
  1757. EXTERN_API_C( OSErr )
  1758. getvol                            (char *                    volName,
  1759.                                  short *                vRefNum);
  1760.  
  1761. EXTERN_API_C( OSErr )
  1762. setvol                            (const char *            volName,
  1763.                                  short                     vRefNum);
  1764.  
  1765. EXTERN_API_C( OSErr )
  1766. unmountvol                        (const char *            volName,
  1767.                                  short                     vRefNum);
  1768.  
  1769. EXTERN_API_C( OSErr )
  1770. eject                            (const char *            volName,
  1771.                                  short                     vRefNum);
  1772.  
  1773. EXTERN_API_C( OSErr )
  1774. flushvol                        (const char *            volName,
  1775.                                  short                     vRefNum);
  1776.  
  1777. EXTERN_API_C( OSErr )
  1778. create                            (const char *            fileName,
  1779.                                  short                     vRefNum,
  1780.                                  OSType                 creator,
  1781.                                  OSType                 fileType);
  1782.  
  1783. EXTERN_API_C( OSErr )
  1784. fsdelete                        (const char *            fileName,
  1785.                                  short                     vRefNum);
  1786.  
  1787. EXTERN_API_C( OSErr )
  1788. openrf                            (const char *            fileName,
  1789.                                  short                     vRefNum,
  1790.                                  short *                refNum);
  1791.  
  1792. EXTERN_API_C( OSErr )
  1793. fsrename                        (const char *            oldName,
  1794.                                  short                     vRefNum,
  1795.                                  const char *            newName);
  1796.  
  1797. EXTERN_API_C( OSErr )
  1798. setfinfo                        (const char *            fileName,
  1799.                                  short                     vRefNum,
  1800.                                  const FInfo *            fndrInfo);
  1801.  
  1802. EXTERN_API_C( OSErr )
  1803. setflock                        (const char *            fileName,
  1804.                                  short                     vRefNum);
  1805.  
  1806. EXTERN_API_C( OSErr )
  1807. rstflock                        (const char *            fileName,
  1808.                                  short                     vRefNum);
  1809.  
  1810. #if CALL_NOT_IN_CARBON
  1811.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1812.                                                                                             #pragma parameter __D0 PBOpenWDSync(__A0)
  1813.                                                                                             #endif
  1814. EXTERN_API( OSErr ) PBOpenWDSync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7001, 0xA260);
  1815.  
  1816. #endif  /* CALL_NOT_IN_CARBON */
  1817.  
  1818. #if CALL_NOT_IN_CARBON
  1819.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1820.                                                                                             #pragma parameter __D0 PBOpenWDAsync(__A0)
  1821.                                                                                             #endif
  1822. EXTERN_API( OSErr ) PBOpenWDAsync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7001, 0xA660);
  1823.  
  1824. #endif  /* CALL_NOT_IN_CARBON */
  1825.  
  1826. #if CALL_NOT_IN_CARBON
  1827.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1828.                                                                                             #pragma parameter __D0 PBCloseWDSync(__A0)
  1829.                                                                                             #endif
  1830. EXTERN_API( OSErr ) PBCloseWDSync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7002, 0xA260);
  1831.  
  1832. #endif  /* CALL_NOT_IN_CARBON */
  1833.  
  1834. #if CALL_NOT_IN_CARBON
  1835.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1836.                                                                                             #pragma parameter __D0 PBCloseWDAsync(__A0)
  1837.                                                                                             #endif
  1838. EXTERN_API( OSErr ) PBCloseWDAsync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7002, 0xA660);
  1839.  
  1840. #endif  /* CALL_NOT_IN_CARBON */
  1841.  
  1842.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1843.                                                                                             #pragma parameter __D0 PBHSetVolSync(__A0)
  1844.                                                                                             #endif
  1845. EXTERN_API( OSErr ) PBHSetVolSync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA215);
  1846.  
  1847.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1848.                                                                                             #pragma parameter __D0 PBHSetVolAsync(__A0)
  1849.                                                                                             #endif
  1850. EXTERN_API( OSErr ) PBHSetVolAsync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA615);
  1851.  
  1852.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1853.                                                                                             #pragma parameter __D0 PBHGetVolSync(__A0)
  1854.                                                                                             #endif
  1855. EXTERN_API( OSErr ) PBHGetVolSync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA214);
  1856.  
  1857.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1858.                                                                                             #pragma parameter __D0 PBHGetVolAsync(__A0)
  1859.                                                                                             #endif
  1860. EXTERN_API( OSErr ) PBHGetVolAsync(WDPBPtr paramBlock)                                        ONEWORDINLINE(0xA614);
  1861.  
  1862.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1863.                                                                                             #pragma parameter __D0 PBCatMoveSync(__A0)
  1864.                                                                                             #endif
  1865. EXTERN_API( OSErr ) PBCatMoveSync(CMovePBPtr paramBlock)                                    TWOWORDINLINE(0x7005, 0xA260);
  1866.  
  1867.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1868.                                                                                             #pragma parameter __D0 PBCatMoveAsync(__A0)
  1869.                                                                                             #endif
  1870. EXTERN_API( OSErr ) PBCatMoveAsync(CMovePBPtr paramBlock)                                    TWOWORDINLINE(0x7005, 0xA660);
  1871.  
  1872.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1873.                                                                                             #pragma parameter __D0 PBDirCreateSync(__A0)
  1874.                                                                                             #endif
  1875. EXTERN_API( OSErr ) PBDirCreateSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7006, 0xA260);
  1876.  
  1877.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1878.                                                                                             #pragma parameter __D0 PBDirCreateAsync(__A0)
  1879.                                                                                             #endif
  1880. EXTERN_API( OSErr ) PBDirCreateAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7006, 0xA660);
  1881.  
  1882. #if CALL_NOT_IN_CARBON
  1883.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1884.                                                                                             #pragma parameter __D0 PBGetWDInfoSync(__A0)
  1885.                                                                                             #endif
  1886. EXTERN_API( OSErr ) PBGetWDInfoSync(WDPBPtr paramBlock)                                        TWOWORDINLINE(0x7007, 0xA260);
  1887.  
  1888. #endif  /* CALL_NOT_IN_CARBON */
  1889.  
  1890. #if CALL_NOT_IN_CARBON
  1891.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1892.                                                                                             #pragma parameter __D0 PBGetWDInfoAsync(__A0)
  1893.                                                                                             #endif
  1894. EXTERN_API( OSErr ) PBGetWDInfoAsync(WDPBPtr paramBlock)                                    TWOWORDINLINE(0x7007, 0xA660);
  1895.  
  1896. #endif  /* CALL_NOT_IN_CARBON */
  1897.  
  1898.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1899.                                                                                             #pragma parameter __D0 PBGetFCBInfoSync(__A0)
  1900.                                                                                             #endif
  1901. EXTERN_API( OSErr ) PBGetFCBInfoSync(FCBPBPtr paramBlock)                                    TWOWORDINLINE(0x7008, 0xA260);
  1902.  
  1903.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1904.                                                                                             #pragma parameter __D0 PBGetFCBInfoAsync(__A0)
  1905.                                                                                             #endif
  1906. EXTERN_API( OSErr ) PBGetFCBInfoAsync(FCBPBPtr paramBlock)                                    TWOWORDINLINE(0x7008, 0xA660);
  1907.  
  1908.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1909.                                                                                             #pragma parameter __D0 PBGetCatInfoSync(__A0)
  1910.                                                                                             #endif
  1911. EXTERN_API( OSErr ) PBGetCatInfoSync(CInfoPBPtr paramBlock)                                    TWOWORDINLINE(0x7009, 0xA260);
  1912.  
  1913.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1914.                                                                                             #pragma parameter __D0 PBGetCatInfoAsync(__A0)
  1915.                                                                                             #endif
  1916. EXTERN_API( OSErr ) PBGetCatInfoAsync(CInfoPBPtr paramBlock)                                TWOWORDINLINE(0x7009, 0xA660);
  1917.  
  1918.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1919.                                                                                             #pragma parameter __D0 PBSetCatInfoSync(__A0)
  1920.                                                                                             #endif
  1921. EXTERN_API( OSErr ) PBSetCatInfoSync(CInfoPBPtr paramBlock)                                    TWOWORDINLINE(0x700A, 0xA260);
  1922.  
  1923.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1924.                                                                                             #pragma parameter __D0 PBSetCatInfoAsync(__A0)
  1925.                                                                                             #endif
  1926. EXTERN_API( OSErr ) PBSetCatInfoAsync(CInfoPBPtr paramBlock)                                TWOWORDINLINE(0x700A, 0xA660);
  1927.  
  1928.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1929.                                                                                             #pragma parameter __D0 PBAllocContigSync(__A0)
  1930.                                                                                             #endif
  1931. EXTERN_API( OSErr ) PBAllocContigSync(ParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA210);
  1932.  
  1933.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1934.                                                                                             #pragma parameter __D0 PBAllocContigAsync(__A0)
  1935.                                                                                             #endif
  1936. EXTERN_API( OSErr ) PBAllocContigAsync(ParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA610);
  1937.  
  1938.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1939.                                                                                             #pragma parameter __D0 PBLockRangeSync(__A0)
  1940.                                                                                             #endif
  1941. EXTERN_API( OSErr ) PBLockRangeSync(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7010, 0xA260);
  1942.  
  1943.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1944.                                                                                             #pragma parameter __D0 PBLockRangeAsync(__A0)
  1945.                                                                                             #endif
  1946. EXTERN_API( OSErr ) PBLockRangeAsync(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7010, 0xA660);
  1947.  
  1948.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1949.                                                                                             #pragma parameter __D0 PBUnlockRangeSync(__A0)
  1950.                                                                                             #endif
  1951. EXTERN_API( OSErr ) PBUnlockRangeSync(ParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7011, 0xA260);
  1952.  
  1953.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1954.                                                                                             #pragma parameter __D0 PBUnlockRangeAsync(__A0)
  1955.                                                                                             #endif
  1956. EXTERN_API( OSErr ) PBUnlockRangeAsync(ParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7011, 0xA660);
  1957.  
  1958.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1959.                                                                                             #pragma parameter __D0 PBSetVInfoSync(__A0)
  1960.                                                                                             #endif
  1961. EXTERN_API( OSErr ) PBSetVInfoSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x700B, 0xA260);
  1962.  
  1963.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1964.                                                                                             #pragma parameter __D0 PBSetVInfoAsync(__A0)
  1965.                                                                                             #endif
  1966. EXTERN_API( OSErr ) PBSetVInfoAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x700B, 0xA660);
  1967.  
  1968.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1969.                                                                                             #pragma parameter __D0 PBHGetVInfoSync(__A0)
  1970.                                                                                             #endif
  1971. EXTERN_API( OSErr ) PBHGetVInfoSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA207);
  1972.  
  1973.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1974.                                                                                             #pragma parameter __D0 PBHGetVInfoAsync(__A0)
  1975.                                                                                             #endif
  1976. EXTERN_API( OSErr ) PBHGetVInfoAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA607);
  1977.  
  1978.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1979.                                                                                             #pragma parameter __D0 PBHOpenSync(__A0)
  1980.                                                                                             #endif
  1981. EXTERN_API( OSErr ) PBHOpenSync(HParmBlkPtr paramBlock)                                        ONEWORDINLINE(0xA200);
  1982.  
  1983.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1984.                                                                                             #pragma parameter __D0 PBHOpenAsync(__A0)
  1985.                                                                                             #endif
  1986. EXTERN_API( OSErr ) PBHOpenAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA600);
  1987.  
  1988.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1989.                                                                                             #pragma parameter __D0 PBHOpenRFSync(__A0)
  1990.                                                                                             #endif
  1991. EXTERN_API( OSErr ) PBHOpenRFSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20A);
  1992.  
  1993.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1994.                                                                                             #pragma parameter __D0 PBHOpenRFAsync(__A0)
  1995.                                                                                             #endif
  1996. EXTERN_API( OSErr ) PBHOpenRFAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA60A);
  1997.  
  1998.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1999.                                                                                             #pragma parameter __D0 PBHOpenDFSync(__A0)
  2000.                                                                                             #endif
  2001. EXTERN_API( OSErr ) PBHOpenDFSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x701A, 0xA260);
  2002.  
  2003.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2004.                                                                                             #pragma parameter __D0 PBHOpenDFAsync(__A0)
  2005.                                                                                             #endif
  2006. EXTERN_API( OSErr ) PBHOpenDFAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x701A, 0xA660);
  2007.  
  2008.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2009.                                                                                             #pragma parameter __D0 PBHCreateSync(__A0)
  2010.                                                                                             #endif
  2011. EXTERN_API( OSErr ) PBHCreateSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA208);
  2012.  
  2013.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2014.                                                                                             #pragma parameter __D0 PBHCreateAsync(__A0)
  2015.                                                                                             #endif
  2016. EXTERN_API( OSErr ) PBHCreateAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA608);
  2017.  
  2018.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2019.                                                                                             #pragma parameter __D0 PBHDeleteSync(__A0)
  2020.                                                                                             #endif
  2021. EXTERN_API( OSErr ) PBHDeleteSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA209);
  2022.  
  2023.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2024.                                                                                             #pragma parameter __D0 PBHDeleteAsync(__A0)
  2025.                                                                                             #endif
  2026. EXTERN_API( OSErr ) PBHDeleteAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA609);
  2027.  
  2028.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2029.                                                                                             #pragma parameter __D0 PBHRenameSync(__A0)
  2030.                                                                                             #endif
  2031. EXTERN_API( OSErr ) PBHRenameSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20B);
  2032.  
  2033.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2034.                                                                                             #pragma parameter __D0 PBHRenameAsync(__A0)
  2035.                                                                                             #endif
  2036. EXTERN_API( OSErr ) PBHRenameAsync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA60B);
  2037.  
  2038.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2039.                                                                                             #pragma parameter __D0 PBHRstFLockSync(__A0)
  2040.                                                                                             #endif
  2041. EXTERN_API( OSErr ) PBHRstFLockSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA242);
  2042.  
  2043.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2044.                                                                                             #pragma parameter __D0 PBHRstFLockAsync(__A0)
  2045.                                                                                             #endif
  2046. EXTERN_API( OSErr ) PBHRstFLockAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA642);
  2047.  
  2048.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2049.                                                                                             #pragma parameter __D0 PBHSetFLockSync(__A0)
  2050.                                                                                             #endif
  2051. EXTERN_API( OSErr ) PBHSetFLockSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA241);
  2052.  
  2053.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2054.                                                                                             #pragma parameter __D0 PBHSetFLockAsync(__A0)
  2055.                                                                                             #endif
  2056. EXTERN_API( OSErr ) PBHSetFLockAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA641);
  2057.  
  2058.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2059.                                                                                             #pragma parameter __D0 PBHGetFInfoSync(__A0)
  2060.                                                                                             #endif
  2061. EXTERN_API( OSErr ) PBHGetFInfoSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20C);
  2062.  
  2063.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2064.                                                                                             #pragma parameter __D0 PBHGetFInfoAsync(__A0)
  2065.                                                                                             #endif
  2066. EXTERN_API( OSErr ) PBHGetFInfoAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA60C);
  2067.  
  2068.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2069.                                                                                             #pragma parameter __D0 PBHSetFInfoSync(__A0)
  2070.                                                                                             #endif
  2071. EXTERN_API( OSErr ) PBHSetFInfoSync(HParmBlkPtr paramBlock)                                    ONEWORDINLINE(0xA20D);
  2072.  
  2073.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2074.                                                                                             #pragma parameter __D0 PBHSetFInfoAsync(__A0)
  2075.                                                                                             #endif
  2076. EXTERN_API( OSErr ) PBHSetFInfoAsync(HParmBlkPtr paramBlock)                                ONEWORDINLINE(0xA60D);
  2077.  
  2078.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2079.                                                                                             #pragma parameter __D0 PBMakeFSSpecSync(__A0)
  2080.                                                                                             #endif
  2081. EXTERN_API( OSErr ) PBMakeFSSpecSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x701B, 0xA260);
  2082.  
  2083.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2084.                                                                                             #pragma parameter __D0 PBMakeFSSpecAsync(__A0)
  2085.                                                                                             #endif
  2086. EXTERN_API( OSErr ) PBMakeFSSpecAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x701B, 0xA660);
  2087.  
  2088. #if CALL_NOT_IN_CARBON
  2089. EXTERN_API( void ) FInitQueue(void )                                                                ONEWORDINLINE(0xA016);
  2090.  
  2091. #endif  /* CALL_NOT_IN_CARBON */
  2092.  
  2093.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2094.                                                                                             #pragma parameter __D0 PBDirectIOOpenDFSync(__A0)
  2095.                                                                                             #endif
  2096. EXTERN_API( OSErr ) PBDirectIOOpenDFSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7000, 0xA0A3);
  2097.  
  2098.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2099.                                                                                             #pragma parameter __D0 PBDirectIOOpenRFSync(__A0)
  2100.                                                                                             #endif
  2101. EXTERN_API( OSErr ) PBDirectIOOpenRFSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7001, 0xA0A3);
  2102.  
  2103.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2104.                                                                                             #pragma parameter __D0 PBDirectIOCloseSync(__A0)
  2105.                                                                                             #endif
  2106. EXTERN_API( OSErr ) PBDirectIOCloseSync(XIOParamPtr paramBlock)                                TWOWORDINLINE(0x7002, 0xA0A3);
  2107.  
  2108.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2109.                                                                                             #pragma parameter __D0 PBDirectIOReadSync(__A0)
  2110.                                                                                             #endif
  2111. EXTERN_API( OSErr ) PBDirectIOReadSync(XIOParamPtr paramBlock)                                TWOWORDINLINE(0x7003, 0xA0A3);
  2112.  
  2113.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2114.                                                                                             #pragma parameter __D0 PBDirectIOReadAsync(__A0)
  2115.                                                                                             #endif
  2116. EXTERN_API( OSErr ) PBDirectIOReadAsync(XIOParamPtr paramBlock)                                TWOWORDINLINE(0x7003, 0xA4A3);
  2117.  
  2118.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2119.                                                                                             #pragma parameter __D0 PBDirectIOWriteSync(__A0)
  2120.                                                                                             #endif
  2121. EXTERN_API( OSErr ) PBDirectIOWriteSync(XIOParamPtr paramBlock)                                TWOWORDINLINE(0x7004, 0xA0A3);
  2122.  
  2123.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2124.                                                                                             #pragma parameter __D0 PBDirectIOWriteAsync(__A0)
  2125.                                                                                             #endif
  2126. EXTERN_API( OSErr ) PBDirectIOWriteAsync(XIOParamPtr paramBlock)                            TWOWORDINLINE(0x7004, 0xA4A3);
  2127.  
  2128. #if CALL_NOT_IN_CARBON
  2129. EXTERN_API( QHdrPtr )
  2130. GetFSQHdr                        (void)                                                        THREEWORDINLINE(0x2EBC, 0x0000, 0x0360);
  2131.  
  2132. #endif  /* CALL_NOT_IN_CARBON */
  2133.  
  2134. #if CALL_NOT_IN_CARBON
  2135. EXTERN_API( QHdrPtr )
  2136. GetVCBQHdr                        (void)                                                        THREEWORDINLINE(0x2EBC, 0x0000, 0x0356);
  2137.  
  2138. #endif  /* CALL_NOT_IN_CARBON */
  2139.  
  2140. /* GetDrvQHdr was moved to Devices.h*/
  2141. EXTERN_API( OSErr )
  2142. HGetVol                            (StringPtr                 volName,
  2143.                                  short *                vRefNum,
  2144.                                  long *                    dirID);
  2145.  
  2146. EXTERN_API( OSErr )
  2147. HOpen                            (short                     vRefNum,
  2148.                                  long                     dirID,
  2149.                                  ConstStr255Param         fileName,
  2150.                                  SInt8                     permission,
  2151.                                  short *                refNum);
  2152.  
  2153. EXTERN_API( OSErr )
  2154. HOpenDF                            (short                     vRefNum,
  2155.                                  long                     dirID,
  2156.                                  ConstStr255Param         fileName,
  2157.                                  SInt8                     permission,
  2158.                                  short *                refNum);
  2159.  
  2160. EXTERN_API( OSErr )
  2161. HOpenRF                            (short                     vRefNum,
  2162.                                  long                     dirID,
  2163.                                  ConstStr255Param         fileName,
  2164.                                  SInt8                     permission,
  2165.                                  short *                refNum);
  2166.  
  2167. EXTERN_API( OSErr )
  2168. AllocContig                        (short                     refNum,
  2169.                                  long *                    count);
  2170.  
  2171. EXTERN_API( OSErr )
  2172. HCreate                            (short                     vRefNum,
  2173.                                  long                     dirID,
  2174.                                  ConstStr255Param         fileName,
  2175.                                  OSType                 creator,
  2176.                                  OSType                 fileType);
  2177.  
  2178. EXTERN_API( OSErr )
  2179. DirCreate                        (short                     vRefNum,
  2180.                                  long                     parentDirID,
  2181.                                  ConstStr255Param         directoryName,
  2182.                                  long *                    createdDirID);
  2183.  
  2184. EXTERN_API( OSErr )
  2185. HDelete                            (short                     vRefNum,
  2186.                                  long                     dirID,
  2187.                                  ConstStr255Param         fileName);
  2188.  
  2189. EXTERN_API( OSErr )
  2190. HGetFInfo                        (short                     vRefNum,
  2191.                                  long                     dirID,
  2192.                                  ConstStr255Param         fileName,
  2193.                                  FInfo *                fndrInfo);
  2194.  
  2195. EXTERN_API( OSErr )
  2196. HSetFInfo                        (short                     vRefNum,
  2197.                                  long                     dirID,
  2198.                                  ConstStr255Param         fileName,
  2199.                                  const FInfo *            fndrInfo);
  2200.  
  2201. EXTERN_API( OSErr )
  2202. HSetFLock                        (short                     vRefNum,
  2203.                                  long                     dirID,
  2204.                                  ConstStr255Param         fileName);
  2205.  
  2206. EXTERN_API( OSErr )
  2207. HRstFLock                        (short                     vRefNum,
  2208.                                  long                     dirID,
  2209.                                  ConstStr255Param         fileName);
  2210.  
  2211. EXTERN_API( OSErr )
  2212. HRename                            (short                     vRefNum,
  2213.                                  long                     dirID,
  2214.                                  ConstStr255Param         oldName,
  2215.                                  ConstStr255Param         newName);
  2216.  
  2217. EXTERN_API( OSErr )
  2218. CatMove                            (short                     vRefNum,
  2219.                                  long                     dirID,
  2220.                                  ConstStr255Param         oldName,
  2221.                                  long                     newDirID,
  2222.                                  ConstStr255Param         newName);
  2223.  
  2224. #if CALL_NOT_IN_CARBON
  2225. EXTERN_API( OSErr )
  2226. OpenWD                            (short                     vRefNum,
  2227.                                  long                     dirID,
  2228.                                  long                     procID,
  2229.                                  short *                wdRefNum);
  2230.  
  2231. #endif  /* CALL_NOT_IN_CARBON */
  2232.  
  2233. #if CALL_NOT_IN_CARBON
  2234. EXTERN_API( OSErr )
  2235. CloseWD                            (short                     wdRefNum);
  2236.  
  2237. #endif  /* CALL_NOT_IN_CARBON */
  2238.  
  2239. #if CALL_NOT_IN_CARBON
  2240. EXTERN_API( OSErr )
  2241. GetWDInfo                        (short                     wdRefNum,
  2242.                                  short *                vRefNum,
  2243.                                  long *                    dirID,
  2244.                                  long *                    procID);
  2245.  
  2246. #endif  /* CALL_NOT_IN_CARBON */
  2247.  
  2248. /*  shared environment  */
  2249.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2250.                                                                                             #pragma parameter __D0 PBHGetVolParmsSync(__A0)
  2251.                                                                                             #endif
  2252. EXTERN_API( OSErr ) PBHGetVolParmsSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7030, 0xA260);
  2253.  
  2254.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2255.                                                                                             #pragma parameter __D0 PBHGetVolParmsAsync(__A0)
  2256.                                                                                             #endif
  2257. EXTERN_API( OSErr ) PBHGetVolParmsAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7030, 0xA660);
  2258.  
  2259.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2260.                                                                                             #pragma parameter __D0 PBHGetLogInInfoSync(__A0)
  2261.                                                                                             #endif
  2262. EXTERN_API( OSErr ) PBHGetLogInInfoSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7031, 0xA260);
  2263.  
  2264.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2265.                                                                                             #pragma parameter __D0 PBHGetLogInInfoAsync(__A0)
  2266.                                                                                             #endif
  2267. EXTERN_API( OSErr ) PBHGetLogInInfoAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7031, 0xA660);
  2268.  
  2269.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2270.                                                                                             #pragma parameter __D0 PBHGetDirAccessSync(__A0)
  2271.                                                                                             #endif
  2272. EXTERN_API( OSErr ) PBHGetDirAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7032, 0xA260);
  2273.  
  2274.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2275.                                                                                             #pragma parameter __D0 PBHGetDirAccessAsync(__A0)
  2276.                                                                                             #endif
  2277. EXTERN_API( OSErr ) PBHGetDirAccessAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7032, 0xA660);
  2278.  
  2279.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2280.                                                                                             #pragma parameter __D0 PBHSetDirAccessSync(__A0)
  2281.                                                                                             #endif
  2282. EXTERN_API( OSErr ) PBHSetDirAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7033, 0xA260);
  2283.  
  2284.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2285.                                                                                             #pragma parameter __D0 PBHSetDirAccessAsync(__A0)
  2286.                                                                                             #endif
  2287. EXTERN_API( OSErr ) PBHSetDirAccessAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7033, 0xA660);
  2288.  
  2289.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2290.                                                                                             #pragma parameter __D0 PBHMapIDSync(__A0)
  2291.                                                                                             #endif
  2292. EXTERN_API( OSErr ) PBHMapIDSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7034, 0xA260);
  2293.  
  2294.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2295.                                                                                             #pragma parameter __D0 PBHMapIDAsync(__A0)
  2296.                                                                                             #endif
  2297. EXTERN_API( OSErr ) PBHMapIDAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7034, 0xA660);
  2298.  
  2299.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2300.                                                                                             #pragma parameter __D0 PBHMapNameSync(__A0)
  2301.                                                                                             #endif
  2302. EXTERN_API( OSErr ) PBHMapNameSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7035, 0xA260);
  2303.  
  2304.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2305.                                                                                             #pragma parameter __D0 PBHMapNameAsync(__A0)
  2306.                                                                                             #endif
  2307. EXTERN_API( OSErr ) PBHMapNameAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7035, 0xA660);
  2308.  
  2309.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2310.                                                                                             #pragma parameter __D0 PBHCopyFileSync(__A0)
  2311.                                                                                             #endif
  2312. EXTERN_API( OSErr ) PBHCopyFileSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7036, 0xA260);
  2313.  
  2314.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2315.                                                                                             #pragma parameter __D0 PBHCopyFileAsync(__A0)
  2316.                                                                                             #endif
  2317. EXTERN_API( OSErr ) PBHCopyFileAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7036, 0xA660);
  2318.  
  2319.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2320.                                                                                             #pragma parameter __D0 PBHMoveRenameSync(__A0)
  2321.                                                                                             #endif
  2322. EXTERN_API( OSErr ) PBHMoveRenameSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7037, 0xA260);
  2323.  
  2324.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2325.                                                                                             #pragma parameter __D0 PBHMoveRenameAsync(__A0)
  2326.                                                                                             #endif
  2327. EXTERN_API( OSErr ) PBHMoveRenameAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7037, 0xA660);
  2328.  
  2329.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2330.                                                                                             #pragma parameter __D0 PBHOpenDenySync(__A0)
  2331.                                                                                             #endif
  2332. EXTERN_API( OSErr ) PBHOpenDenySync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7038, 0xA260);
  2333.  
  2334.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2335.                                                                                             #pragma parameter __D0 PBHOpenDenyAsync(__A0)
  2336.                                                                                             #endif
  2337. EXTERN_API( OSErr ) PBHOpenDenyAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7038, 0xA660);
  2338.  
  2339.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2340.                                                                                             #pragma parameter __D0 PBHOpenRFDenySync(__A0)
  2341.                                                                                             #endif
  2342. EXTERN_API( OSErr ) PBHOpenRFDenySync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7039, 0xA260);
  2343.  
  2344.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2345.                                                                                             #pragma parameter __D0 PBHOpenRFDenyAsync(__A0)
  2346.                                                                                             #endif
  2347. EXTERN_API( OSErr ) PBHOpenRFDenyAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7039, 0xA660);
  2348.  
  2349.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2350.                                                                                             #pragma parameter __D0 PBGetXCatInfoSync(__A0)
  2351.                                                                                             #endif
  2352. EXTERN_API( OSErr ) PBGetXCatInfoSync(XCInfoPBPtr paramBlock)                                TWOWORDINLINE(0x703A, 0xA260);
  2353.  
  2354.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2355.                                                                                             #pragma parameter __D0 PBGetXCatInfoAsync(__A0)
  2356.                                                                                             #endif
  2357. EXTERN_API( OSErr ) PBGetXCatInfoAsync(XCInfoPBPtr paramBlock)                                TWOWORDINLINE(0x703A, 0xA660);
  2358.  
  2359.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2360.                                                                                             #pragma parameter __D0 PBExchangeFilesSync(__A0)
  2361.                                                                                             #endif
  2362. EXTERN_API( OSErr ) PBExchangeFilesSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7017, 0xA260);
  2363.  
  2364.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2365.                                                                                             #pragma parameter __D0 PBExchangeFilesAsync(__A0)
  2366.                                                                                             #endif
  2367. EXTERN_API( OSErr ) PBExchangeFilesAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7017, 0xA660);
  2368.  
  2369.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2370.                                                                                             #pragma parameter __D0 PBCreateFileIDRefSync(__A0)
  2371.                                                                                             #endif
  2372. EXTERN_API( OSErr ) PBCreateFileIDRefSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7014, 0xA260);
  2373.  
  2374.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2375.                                                                                             #pragma parameter __D0 PBCreateFileIDRefAsync(__A0)
  2376.                                                                                             #endif
  2377. EXTERN_API( OSErr ) PBCreateFileIDRefAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7014, 0xA660);
  2378.  
  2379.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2380.                                                                                             #pragma parameter __D0 PBResolveFileIDRefSync(__A0)
  2381.                                                                                             #endif
  2382. EXTERN_API( OSErr ) PBResolveFileIDRefSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7016, 0xA260);
  2383.  
  2384.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2385.                                                                                             #pragma parameter __D0 PBResolveFileIDRefAsync(__A0)
  2386.                                                                                             #endif
  2387. EXTERN_API( OSErr ) PBResolveFileIDRefAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7016, 0xA660);
  2388.  
  2389.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2390.                                                                                             #pragma parameter __D0 PBDeleteFileIDRefSync(__A0)
  2391.                                                                                             #endif
  2392. EXTERN_API( OSErr ) PBDeleteFileIDRefSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7015, 0xA260);
  2393.  
  2394.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2395.                                                                                             #pragma parameter __D0 PBDeleteFileIDRefAsync(__A0)
  2396.                                                                                             #endif
  2397. EXTERN_API( OSErr ) PBDeleteFileIDRefAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7015, 0xA660);
  2398.  
  2399.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2400.                                                                                             #pragma parameter __D0 PBGetForeignPrivsSync(__A0)
  2401.                                                                                             #endif
  2402. EXTERN_API( OSErr ) PBGetForeignPrivsSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7060, 0xA260);
  2403.  
  2404.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2405.                                                                                             #pragma parameter __D0 PBGetForeignPrivsAsync(__A0)
  2406.                                                                                             #endif
  2407. EXTERN_API( OSErr ) PBGetForeignPrivsAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7060, 0xA660);
  2408.  
  2409.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2410.                                                                                             #pragma parameter __D0 PBSetForeignPrivsSync(__A0)
  2411.                                                                                             #endif
  2412. EXTERN_API( OSErr ) PBSetForeignPrivsSync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7061, 0xA260);
  2413.  
  2414.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2415.                                                                                             #pragma parameter __D0 PBSetForeignPrivsAsync(__A0)
  2416.                                                                                             #endif
  2417. EXTERN_API( OSErr ) PBSetForeignPrivsAsync(HParmBlkPtr paramBlock)                            TWOWORDINLINE(0x7061, 0xA660);
  2418.  
  2419. /*  Desktop Manager  */
  2420.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2421.                                                                                             #pragma parameter __D0 PBDTGetPath(__A0)
  2422.                                                                                             #endif
  2423. EXTERN_API( OSErr ) PBDTGetPath(DTPBPtr paramBlock)                                            TWOWORDINLINE(0x7020, 0xA260);
  2424.  
  2425.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2426.                                                                                             #pragma parameter __D0 PBDTCloseDown(__A0)
  2427.                                                                                             #endif
  2428. EXTERN_API( OSErr ) PBDTCloseDown(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7021, 0xA260);
  2429.  
  2430.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2431.                                                                                             #pragma parameter __D0 PBDTAddIconSync(__A0)
  2432.                                                                                             #endif
  2433. EXTERN_API( OSErr ) PBDTAddIconSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7022, 0xA260);
  2434.  
  2435.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2436.                                                                                             #pragma parameter __D0 PBDTAddIconAsync(__A0)
  2437.                                                                                             #endif
  2438. EXTERN_API( OSErr ) PBDTAddIconAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7022, 0xA660);
  2439.  
  2440.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2441.                                                                                             #pragma parameter __D0 PBDTGetIconSync(__A0)
  2442.                                                                                             #endif
  2443. EXTERN_API( OSErr ) PBDTGetIconSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7023, 0xA260);
  2444.  
  2445.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2446.                                                                                             #pragma parameter __D0 PBDTGetIconAsync(__A0)
  2447.                                                                                             #endif
  2448. EXTERN_API( OSErr ) PBDTGetIconAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7023, 0xA660);
  2449.  
  2450.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2451.                                                                                             #pragma parameter __D0 PBDTGetIconInfoSync(__A0)
  2452.                                                                                             #endif
  2453. EXTERN_API( OSErr ) PBDTGetIconInfoSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7024, 0xA260);
  2454.  
  2455.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2456.                                                                                             #pragma parameter __D0 PBDTGetIconInfoAsync(__A0)
  2457.                                                                                             #endif
  2458. EXTERN_API( OSErr ) PBDTGetIconInfoAsync(DTPBPtr paramBlock)                                TWOWORDINLINE(0x7024, 0xA660);
  2459.  
  2460.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2461.                                                                                             #pragma parameter __D0 PBDTAddAPPLSync(__A0)
  2462.                                                                                             #endif
  2463. EXTERN_API( OSErr ) PBDTAddAPPLSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7025, 0xA260);
  2464.  
  2465.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2466.                                                                                             #pragma parameter __D0 PBDTAddAPPLAsync(__A0)
  2467.                                                                                             #endif
  2468. EXTERN_API( OSErr ) PBDTAddAPPLAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7025, 0xA660);
  2469.  
  2470.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2471.                                                                                             #pragma parameter __D0 PBDTRemoveAPPLSync(__A0)
  2472.                                                                                             #endif
  2473. EXTERN_API( OSErr ) PBDTRemoveAPPLSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7026, 0xA260);
  2474.  
  2475.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2476.                                                                                             #pragma parameter __D0 PBDTRemoveAPPLAsync(__A0)
  2477.                                                                                             #endif
  2478. EXTERN_API( OSErr ) PBDTRemoveAPPLAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7026, 0xA660);
  2479.  
  2480.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2481.                                                                                             #pragma parameter __D0 PBDTGetAPPLSync(__A0)
  2482.                                                                                             #endif
  2483. EXTERN_API( OSErr ) PBDTGetAPPLSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x7027, 0xA260);
  2484.  
  2485.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2486.                                                                                             #pragma parameter __D0 PBDTGetAPPLAsync(__A0)
  2487.                                                                                             #endif
  2488. EXTERN_API( OSErr ) PBDTGetAPPLAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7027, 0xA660);
  2489.  
  2490.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2491.                                                                                             #pragma parameter __D0 PBDTSetCommentSync(__A0)
  2492.                                                                                             #endif
  2493. EXTERN_API( OSErr ) PBDTSetCommentSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7028, 0xA260);
  2494.  
  2495.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2496.                                                                                             #pragma parameter __D0 PBDTSetCommentAsync(__A0)
  2497.                                                                                             #endif
  2498. EXTERN_API( OSErr ) PBDTSetCommentAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x7028, 0xA660);
  2499.  
  2500.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2501.                                                                                             #pragma parameter __D0 PBDTRemoveCommentSync(__A0)
  2502.                                                                                             #endif
  2503. EXTERN_API( OSErr ) PBDTRemoveCommentSync(DTPBPtr paramBlock)                                TWOWORDINLINE(0x7029, 0xA260);
  2504.  
  2505.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2506.                                                                                             #pragma parameter __D0 PBDTRemoveCommentAsync(__A0)
  2507.                                                                                             #endif
  2508. EXTERN_API( OSErr ) PBDTRemoveCommentAsync(DTPBPtr paramBlock)                                TWOWORDINLINE(0x7029, 0xA660);
  2509.  
  2510.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2511.                                                                                             #pragma parameter __D0 PBDTGetCommentSync(__A0)
  2512.                                                                                             #endif
  2513. EXTERN_API( OSErr ) PBDTGetCommentSync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x702A, 0xA260);
  2514.  
  2515.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2516.                                                                                             #pragma parameter __D0 PBDTGetCommentAsync(__A0)
  2517.                                                                                             #endif
  2518. EXTERN_API( OSErr ) PBDTGetCommentAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x702A, 0xA660);
  2519.  
  2520.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2521.                                                                                             #pragma parameter __D0 PBDTFlushSync(__A0)
  2522.                                                                                             #endif
  2523. EXTERN_API( OSErr ) PBDTFlushSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702B, 0xA260);
  2524.  
  2525.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2526.                                                                                             #pragma parameter __D0 PBDTFlushAsync(__A0)
  2527.                                                                                             #endif
  2528. EXTERN_API( OSErr ) PBDTFlushAsync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702B, 0xA660);
  2529.  
  2530.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2531.                                                                                             #pragma parameter __D0 PBDTResetSync(__A0)
  2532.                                                                                             #endif
  2533. EXTERN_API( OSErr ) PBDTResetSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702C, 0xA260);
  2534.  
  2535.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2536.                                                                                             #pragma parameter __D0 PBDTResetAsync(__A0)
  2537.                                                                                             #endif
  2538. EXTERN_API( OSErr ) PBDTResetAsync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702C, 0xA660);
  2539.  
  2540.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2541.                                                                                             #pragma parameter __D0 PBDTGetInfoSync(__A0)
  2542.                                                                                             #endif
  2543. EXTERN_API( OSErr ) PBDTGetInfoSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702D, 0xA260);
  2544.  
  2545.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2546.                                                                                             #pragma parameter __D0 PBDTGetInfoAsync(__A0)
  2547.                                                                                             #endif
  2548. EXTERN_API( OSErr ) PBDTGetInfoAsync(DTPBPtr paramBlock)                                    TWOWORDINLINE(0x702D, 0xA660);
  2549.  
  2550.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2551.                                                                                             #pragma parameter __D0 PBDTOpenInform(__A0)
  2552.                                                                                             #endif
  2553. EXTERN_API( OSErr ) PBDTOpenInform(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702E, 0xA060);
  2554.  
  2555.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2556.                                                                                             #pragma parameter __D0 PBDTDeleteSync(__A0)
  2557.                                                                                             #endif
  2558. EXTERN_API( OSErr ) PBDTDeleteSync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702F, 0xA060);
  2559.  
  2560.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2561.                                                                                             #pragma parameter __D0 PBDTDeleteAsync(__A0)
  2562.                                                                                             #endif
  2563. EXTERN_API( OSErr ) PBDTDeleteAsync(DTPBPtr paramBlock)                                        TWOWORDINLINE(0x702F, 0xA460);
  2564.  
  2565. /*  VolumeMount traps  */
  2566.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2567.                                                                                             #pragma parameter __D0 PBGetVolMountInfoSize(__A0)
  2568.                                                                                             #endif
  2569. EXTERN_API( OSErr ) PBGetVolMountInfoSize(ParmBlkPtr paramBlock)                            TWOWORDINLINE(0x703F, 0xA260);
  2570.  
  2571.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2572.                                                                                             #pragma parameter __D0 PBGetVolMountInfo(__A0)
  2573.                                                                                             #endif
  2574. EXTERN_API( OSErr ) PBGetVolMountInfo(ParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7040, 0xA260);
  2575.  
  2576.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2577.                                                                                             #pragma parameter __D0 PBVolumeMount(__A0)
  2578.                                                                                             #endif
  2579. EXTERN_API( OSErr ) PBVolumeMount(ParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7041, 0xA260);
  2580.  
  2581. /*  FSp traps  */
  2582. EXTERN_API( OSErr )
  2583. FSMakeFSSpec                    (short                     vRefNum,
  2584.                                  long                     dirID,
  2585.                                  ConstStr255Param         fileName,
  2586.                                  FSSpec *                spec)                                TWOWORDINLINE(0x7001, 0xAA52);
  2587.  
  2588. EXTERN_API( OSErr )
  2589. FSpOpenDF                        (const FSSpec *            spec,
  2590.                                  SInt8                     permission,
  2591.                                  short *                refNum)                                TWOWORDINLINE(0x7002, 0xAA52);
  2592.  
  2593. EXTERN_API( OSErr )
  2594. FSpOpenRF                        (const FSSpec *            spec,
  2595.                                  SInt8                     permission,
  2596.                                  short *                refNum)                                TWOWORDINLINE(0x7003, 0xAA52);
  2597.  
  2598. EXTERN_API( OSErr )
  2599. FSpCreate                        (const FSSpec *            spec,
  2600.                                  OSType                 creator,
  2601.                                  OSType                 fileType,
  2602.                                  ScriptCode             scriptTag)                            TWOWORDINLINE(0x7004, 0xAA52);
  2603.  
  2604. EXTERN_API( OSErr )
  2605. FSpDirCreate                    (const FSSpec *            spec,
  2606.                                  ScriptCode             scriptTag,
  2607.                                  long *                    createdDirID)                        TWOWORDINLINE(0x7005, 0xAA52);
  2608.  
  2609. EXTERN_API( OSErr )
  2610. FSpDelete                        (const FSSpec *            spec)                                TWOWORDINLINE(0x7006, 0xAA52);
  2611.  
  2612. EXTERN_API( OSErr )
  2613. FSpGetFInfo                        (const FSSpec *            spec,
  2614.                                  FInfo *                fndrInfo)                            TWOWORDINLINE(0x7007, 0xAA52);
  2615.  
  2616. EXTERN_API( OSErr )
  2617. FSpSetFInfo                        (const FSSpec *            spec,
  2618.                                  const FInfo *            fndrInfo)                            TWOWORDINLINE(0x7008, 0xAA52);
  2619.  
  2620. EXTERN_API( OSErr )
  2621. FSpSetFLock                        (const FSSpec *            spec)                                TWOWORDINLINE(0x7009, 0xAA52);
  2622.  
  2623. EXTERN_API( OSErr )
  2624. FSpRstFLock                        (const FSSpec *            spec)                                TWOWORDINLINE(0x700A, 0xAA52);
  2625.  
  2626. EXTERN_API( OSErr )
  2627. FSpRename                        (const FSSpec *            spec,
  2628.                                  ConstStr255Param         newName)                            TWOWORDINLINE(0x700B, 0xAA52);
  2629.  
  2630. EXTERN_API( OSErr )
  2631. FSpCatMove                        (const FSSpec *            source,
  2632.                                  const FSSpec *            dest)                                TWOWORDINLINE(0x700C, 0xAA52);
  2633.  
  2634. EXTERN_API( OSErr )
  2635. FSpExchangeFiles                (const FSSpec *            source,
  2636.                                  const FSSpec *            dest)                                TWOWORDINLINE(0x700F, 0xAA52);
  2637.  
  2638.  
  2639.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2640.                                                                                             #pragma parameter __D0 PBShareSync(__A0)
  2641.                                                                                             #endif
  2642. EXTERN_API( OSErr ) PBShareSync(HParmBlkPtr paramBlock)                                        TWOWORDINLINE(0x7042, 0xA260);
  2643.  
  2644.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2645.                                                                                             #pragma parameter __D0 PBShareAsync(__A0)
  2646.                                                                                             #endif
  2647. EXTERN_API( OSErr ) PBShareAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7042, 0xA660);
  2648.  
  2649.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2650.                                                                                             #pragma parameter __D0 PBUnshareSync(__A0)
  2651.                                                                                             #endif
  2652. EXTERN_API( OSErr ) PBUnshareSync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7043, 0xA260);
  2653.  
  2654.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2655.                                                                                             #pragma parameter __D0 PBUnshareAsync(__A0)
  2656.                                                                                             #endif
  2657. EXTERN_API( OSErr ) PBUnshareAsync(HParmBlkPtr paramBlock)                                    TWOWORDINLINE(0x7043, 0xA660);
  2658.  
  2659.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2660.                                                                                             #pragma parameter __D0 PBGetUGEntrySync(__A0)
  2661.                                                                                             #endif
  2662. EXTERN_API( OSErr ) PBGetUGEntrySync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7044, 0xA260);
  2663.  
  2664.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2665.                                                                                             #pragma parameter __D0 PBGetUGEntryAsync(__A0)
  2666.                                                                                             #endif
  2667. EXTERN_API( OSErr ) PBGetUGEntryAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7044, 0xA660);
  2668.  
  2669.  
  2670.  
  2671.  
  2672. #if TARGET_CPU_68K
  2673. /*
  2674.     PBGetAltAccess and PBSetAltAccess are obsolete and will not be supported 
  2675.     on PowerPC. Equivalent functionality is provided by the routines 
  2676.     PBGetForeignPrivs and PBSetForeignPrivs.
  2677. */
  2678.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2679.                                                                                             #pragma parameter __D0 PBGetAltAccessSync(__A0)
  2680.                                                                                             #endif
  2681. EXTERN_API( OSErr ) PBGetAltAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7060, 0xA060);
  2682.  
  2683.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2684.                                                                                             #pragma parameter __D0 PBGetAltAccessAsync(__A0)
  2685.                                                                                             #endif
  2686. EXTERN_API( OSErr ) PBGetAltAccessAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7060, 0xA460);
  2687.  
  2688.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2689.                                                                                             #pragma parameter __D0 PBSetAltAccessSync(__A0)
  2690.                                                                                             #endif
  2691. EXTERN_API( OSErr ) PBSetAltAccessSync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7061, 0xA060);
  2692.  
  2693.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  2694.                                                                                             #pragma parameter __D0 PBSetAltAccessAsync(__A0)
  2695.                                                                                             #endif
  2696. EXTERN_API( OSErr ) PBSetAltAccessAsync(HParmBlkPtr paramBlock)                                TWOWORDINLINE(0x7061, 0xA460);
  2697.  
  2698. #define PBSetAltAccess(pb, async) ((async) ? PBSetAltAccessAsync(pb) : PBSetAltAccessSync(pb))
  2699. #define PBGetAltAccess(pb, async) ((async) ? PBGetAltAccessAsync(pb) : PBGetAltAccessSync(pb))
  2700. #endif  /* TARGET_CPU_68K */
  2701.  
  2702.  
  2703. /*
  2704.     The PBxxx() routines are obsolete.  
  2705.     
  2706.     Use the PBxxxSync() or PBxxxAsync() version instead.
  2707. */
  2708. #define PBGetVInfo(pb, async) ((async) ? PBGetVInfoAsync(pb) : PBGetVInfoSync(pb))
  2709. #define PBXGetVolInfo(pb, async) ((async) ? PBXGetVolInfoAsync(pb) : PBXGetVolInfoSync(pb))
  2710. #define PBGetVol(pb, async) ((async) ? PBGetVolAsync(pb) : PBGetVolSync(pb))
  2711. #define PBSetVol(pb, async) ((async) ? PBSetVolAsync(pb) : PBSetVolSync(pb))
  2712. #define PBFlushVol(pb, async) ((async) ? PBFlushVolAsync(pb) : PBFlushVolSync(pb))
  2713. #define PBCreate(pb, async) ((async) ? PBCreateAsync(pb) : PBCreateSync(pb))
  2714. #define PBDelete(pb, async) ((async) ? PBDeleteAsync(pb) : PBDeleteSync(pb))
  2715. #define PBOpenDF(pb, async) ((async) ? PBOpenDFAsync(pb) : PBOpenDFSync(pb))
  2716. #define PBOpenRF(pb, async) ((async) ? PBOpenRFAsync(pb) : PBOpenRFSync(pb))
  2717. #define PBRename(pb, async) ((async) ? PBRenameAsync(pb) : PBRenameSync(pb))
  2718. #define PBGetFInfo(pb, async) ((async) ? PBGetFInfoAsync(pb) : PBGetFInfoSync(pb))
  2719. #define PBSetFInfo(pb, async) ((async) ? PBSetFInfoAsync(pb) : PBSetFInfoSync(pb))
  2720. #define PBSetFLock(pb, async) ((async) ? PBSetFLockAsync(pb) : PBSetFLockSync(pb))
  2721. #define PBRstFLock(pb, async) ((async) ? PBRstFLockAsync(pb) : PBRstFLockSync(pb))
  2722. #define PBSetFVers(pb, async) ((async) ? PBSetFVersAsync(pb) : PBSetFVersSync(pb))
  2723. #define PBAllocate(pb, async) ((async) ? PBAllocateAsync(pb) : PBAllocateSync(pb))
  2724. #define PBGetEOF(pb, async) ((async) ? PBGetEOFAsync(pb) : PBGetEOFSync(pb))
  2725. #define PBSetEOF(pb, async) ((async) ? PBSetEOFAsync(pb) : PBSetEOFSync(pb))
  2726. #define PBGetFPos(pb, async) ((async) ? PBGetFPosAsync(pb) : PBGetFPosSync(pb))
  2727. #define PBSetFPos(pb, async) ((async) ? PBSetFPosAsync(pb) : PBSetFPosSync(pb))
  2728. #define PBFlushFile(pb, async) ((async) ? PBFlushFileAsync(pb) : PBFlushFileSync(pb))
  2729. #define PBCatSearch(pb, async) ((async) ? PBCatSearchAsync(pb) : PBCatSearchSync(pb))
  2730. #define PBOpenWD(pb, async) ((async) ? PBOpenWDAsync(pb) : PBOpenWDSync(pb))
  2731. #define PBCloseWD(pb, async) ((async) ? PBCloseWDAsync(pb) : PBCloseWDSync(pb))
  2732. #define PBHSetVol(pb, async) ((async) ? PBHSetVolAsync(pb) : PBHSetVolSync(pb))
  2733. #define PBHGetVol(pb, async) ((async) ? PBHGetVolAsync(pb) : PBHGetVolSync(pb))
  2734. #define PBCatMove(pb, async) ((async) ? PBCatMoveAsync(pb) : PBCatMoveSync(pb))
  2735. #define PBDirCreate(pb, async) ((async) ? PBDirCreateAsync(pb) : PBDirCreateSync(pb))
  2736. #define PBGetWDInfo(pb, async) ((async) ? PBGetWDInfoAsync(pb) : PBGetWDInfoSync(pb))
  2737. #define PBGetFCBInfo(pb, async) ((async) ? PBGetFCBInfoAsync(pb) : PBGetFCBInfoSync(pb))
  2738. #define PBGetCatInfo(pb, async) ((async) ? PBGetCatInfoAsync(pb) : PBGetCatInfoSync(pb))
  2739. #define PBSetCatInfo(pb, async) ((async) ? PBSetCatInfoAsync(pb) : PBSetCatInfoSync(pb))
  2740. #define PBAllocContig(pb, async) ((async) ? PBAllocContigAsync(pb) : PBAllocContigSync(pb))
  2741. #define PBLockRange(pb, async) ((async) ? PBLockRangeAsync(pb) : PBLockRangeSync(pb))
  2742. #define PBUnlockRange(pb, async) ((async) ? PBUnlockRangeAsync(pb) : PBUnlockRangeSync(pb))
  2743. #define PBSetVInfo(pb, async) ((async) ? PBSetVInfoAsync(pb) : PBSetVInfoSync(pb))
  2744. #define PBHGetVInfo(pb, async) ((async) ? PBHGetVInfoAsync(pb) : PBHGetVInfoSync(pb))
  2745. #define PBHOpen(pb, async) ((async) ? PBHOpenAsync(pb) : PBHOpenSync(pb))
  2746. #define PBHOpenRF(pb, async) ((async) ? PBHOpenRFAsync(pb) : PBHOpenRFSync(pb))
  2747. #define PBHOpenDF(pb, async) ((async) ? PBHOpenDFAsync(pb) : PBHOpenDFSync(pb))
  2748. #define PBHCreate(pb, async) ((async) ? PBHCreateAsync(pb) : PBHCreateSync(pb))
  2749. #define PBHDelete(pb, async) ((async) ? PBHDeleteAsync(pb) : PBHDeleteSync(pb))
  2750. #define PBHRename(pb, async) ((async) ? PBHRenameAsync(pb) : PBHRenameSync(pb))
  2751. #define PBHRstFLock(pb, async) ((async) ? PBHRstFLockAsync(pb) : PBHRstFLockSync(pb))
  2752. #define PBHSetFLock(pb, async) ((async) ? PBHSetFLockAsync(pb) : PBHSetFLockSync(pb))
  2753. #define PBHGetFInfo(pb, async) ((async) ? PBHGetFInfoAsync(pb) : PBHGetFInfoSync(pb))
  2754. #define PBHSetFInfo(pb, async) ((async) ? PBHSetFInfoAsync(pb) : PBHSetFInfoSync(pb))
  2755. #define PBMakeFSSpec(pb, async) ((async) ? PBMakeFSSpecAsync(pb) : PBMakeFSSpecSync(pb))
  2756. #define PBHGetVolParms(pb, async) ((async) ? PBHGetVolParmsAsync(pb) : PBHGetVolParmsSync(pb))
  2757. #define PBHGetLogInInfo(pb, async) ((async) ? PBHGetLogInInfoAsync(pb) : PBHGetLogInInfoSync(pb))
  2758. #define PBHGetDirAccess(pb, async) ((async) ? PBHGetDirAccessAsync(pb) : PBHGetDirAccessSync(pb))
  2759. #define PBHSetDirAccess(pb, async) ((async) ? PBHSetDirAccessAsync(pb) : PBHSetDirAccessSync(pb))
  2760. #define PBHMapID(pb, async) ((async) ? PBHMapIDAsync(pb) : PBHMapIDSync(pb))
  2761. #define PBHMapName(pb, async) ((async) ? PBHMapNameAsync(pb) : PBHMapNameSync(pb))
  2762. #define PBHCopyFile(pb, async) ((async) ? PBHCopyFileAsync(pb) : PBHCopyFileSync(pb))
  2763. #define PBHMoveRename(pb, async) ((async) ? PBHMoveRenameAsync(pb) : PBHMoveRenameSync(pb))
  2764. #define PBHOpenDeny(pb, async) ((async) ? PBHOpenDenyAsync(pb) : PBHOpenDenySync(pb))
  2765. #define PBHOpenRFDeny(pb, async) ((async) ? PBHOpenRFDenyAsync(pb) : PBHOpenRFDenySync(pb))
  2766. #define PBExchangeFiles(pb, async) ((async) ? PBExchangeFilesAsync(pb) : PBExchangeFilesSync(pb))
  2767. #define PBCreateFileIDRef(pb, async) ((async) ? PBCreateFileIDRefAsync(pb) : PBCreateFileIDRefSync(pb))
  2768. #define PBResolveFileIDRef(pb, async) ((async) ? PBResolveFileIDRefAsync(pb) : PBResolveFileIDRefSync(pb))
  2769. #define PBDeleteFileIDRef(pb, async) ((async) ? PBDeleteFileIDRefAsync(pb) : PBDeleteFileIDRefSync(pb))
  2770. #define PBGetForeignPrivs(pb, async) ((async) ? PBGetForeignPrivsAsync(pb) : PBGetForeignPrivsSync(pb))
  2771. #define PBSetForeignPrivs(pb, async) ((async) ? PBSetForeignPrivsAsync(pb) : PBSetForeignPrivsSync(pb))
  2772. #define PBDTAddIcon(pb, async) ((async) ? PBDTAddIconAsync(pb) : PBDTAddIconSync(pb))
  2773. #define PBDTGetIcon(pb, async) ((async) ? PBDTGetIconAsync(pb) : PBDTGetIconSync(pb))
  2774. #define PBDTGetIconInfo(pb, async) ((async) ? PBDTGetIconInfoAsync(pb) : PBDTGetIconInfoSync(pb))
  2775. #define PBDTAddAPPL(pb, async) ((async) ? PBDTAddAPPLAsync(pb) : PBDTAddAPPLSync(pb))
  2776. #define PBDTRemoveAPPL(pb, async) ((async) ? PBDTRemoveAPPLAsync(pb) : PBDTRemoveAPPLSync(pb))
  2777. #define PBDTGetAPPL(pb, async) ((async) ? PBDTGetAPPLAsync(pb) : PBDTGetAPPLSync(pb))
  2778. #define PBDTSetComment(pb, async) ((async) ? PBDTSetCommentAsync(pb) : PBDTSetCommentSync(pb))
  2779. #define PBDTRemoveComment(pb, async) ((async) ? PBDTRemoveCommentAsync(pb) : PBDTRemoveCommentSync(pb))
  2780. #define PBDTGetComment(pb, async) ((async) ? PBDTGetCommentAsync(pb) : PBDTGetCommentSync(pb))
  2781. #define PBDTFlush(pb, async) ((async) ? PBDTFlushAsync(pb) : PBDTFlushSync(pb))
  2782. #define PBDTReset(pb, async) ((async) ? PBDTResetAsync(pb) : PBDTResetSync(pb))
  2783. #define PBDTGetInfo(pb, async) ((async) ? PBDTGetInfoAsync(pb) : PBDTGetInfoSync(pb))
  2784. #define PBDTDelete(pb, async) ((async) ? PBDTDeleteAsync(pb) : PBDTDeleteSync(pb))
  2785. /*    The following are new bits for gestaltFSAttr ('fs  ')*/
  2786. enum {
  2787.     gestaltHasHFSPlusAPIs        = 12,
  2788.     gestaltMustUseFCBAccessors    = 13
  2789. };
  2790.  
  2791. /*
  2792.    •• The following errors are within the HFS extension range (-1300..-1500).
  2793.    •• Once they stabilize, they need to be moved to Errors.i, and added to
  2794.    •• the allocations project.
  2795. */
  2796. enum {
  2797.     errFSUnknownCall            = -1400,                        /* selector is not recognized by this filesystem */
  2798.     errFSBadFSRef                = -1401,                        /* FSRef parameter is bad */
  2799.     errFSBadForkName            = -1402,                        /* Fork name parameter is bad */
  2800.     errFSBadBuffer                = -1403,                        /* A buffer parameter was bad */
  2801.     errFSBadForkRef                = -1404,                        /* A ForkRefNum parameter was bad */
  2802.     errFSBadInfoBitmap            = -1405,                        /* A CatalogInfoBitmap or VolumeInfoBitmap has reserved or invalid bits set */
  2803.     errFSMissingCatInfo            = -1406,                        /* A CatalogInfo parameter was NULL */
  2804.     errFSNotAFolder                = -1407,                        /* Expected a folder, got a file */
  2805.     errFSForkNotFound            = -1409,                        /* Named fork does not exist */
  2806.     errFSNameTooLong            = -1410,                        /* File/fork name is too long to create/rename */
  2807.     errFSMissingName            = -1411,                        /* A Unicode name parameter was NULL */
  2808.     errFSBadPosMode                = -1412,                        /* Newline bits set in positionMode */
  2809.     errFSBadAllocFlags            = -1413,                        /* Invalid bits set in allocationFlags */
  2810.     errFSNoMoreItems            = -1417,                        /* Iteration ran out of items to return */
  2811.     errFSBadItemCount            = -1418,                        /* maximumItems was zero */
  2812.     errFSBadSearchParams        = -1419,                        /* Something wrong with CatalogSearch searchParams */
  2813.     errFSRefsDifferent            = -1420,                        /* FSCompareFSRefs; refs are for different objects */
  2814.     errFSForkExists                = -1421                            /* Named fork already exists. */
  2815. };
  2816.  
  2817.  
  2818. typedef SInt16                             FSVolumeRefNum;
  2819. enum {
  2820.     kFSInvalidVolumeRefNum        = 0
  2821. };
  2822.  
  2823.  
  2824. struct FSRef {
  2825.     UInt8                             hidden[80];                    /* private to File Manager; •• need symbolic constant */
  2826. };
  2827. typedef struct FSRef                    FSRef;
  2828. typedef FSRef *                            FSRefPtr;
  2829. /*    CatalogInfoBitmap describes which fields of the CatalogInfo you wish to get or set.*/
  2830.  
  2831. typedef UInt32                             FSCatalogInfoBitmap;
  2832. enum {
  2833.     kFSCatInfoNone                = 0x00000000,
  2834.     kFSCatInfoTextEncoding        = 0x00000001,
  2835.     kFSCatInfoNodeFlags            = 0x00000002,                    /* Locked (bit 0) and directory (bit 4) only */
  2836.     kFSCatInfoVolume            = 0x00000004,
  2837.     kFSCatInfoParentDirID        = 0x00000008,
  2838.     kFSCatInfoNodeID            = 0x00000010,
  2839.     kFSCatInfoCreateDate        = 0x00000020,
  2840.     kFSCatInfoContentMod        = 0x00000040,
  2841.     kFSCatInfoAttrMod            = 0x00000080,
  2842.     kFSCatInfoAccessDate        = 0x00000100,
  2843.     kFSCatInfoBackupDate        = 0x00000200,
  2844.     kFSCatInfoPermissions        = 0x00000400,                    /* Should this be finer granularity? */
  2845.     kFSCatInfoFinderInfo        = 0x00000800,
  2846.     kFSCatInfoFinderXInfo        = 0x00001000,
  2847.     kFSCatInfoValence            = 0x00002000,                    /* Folders only, zero for files */
  2848.     kFSCatInfoDataSizes            = 0x00004000,                    /* Data fork logical and physical size */
  2849.     kFSCatInfoRsrcSizes            = 0x00008000,                    /* Resource fork logical and physical size */
  2850.     kFSCatInfoSharingFlags        = 0x00010000,                    /* sharingFlags: kioFlAttribMountedBit, kioFlAttribSharePointBit */
  2851.     kFSCatInfoUserPrivs            = 0x00020000,                    /* userPrivileges */
  2852.     kFSCatInfoAllDates            = 0x000003E0,
  2853.     kFSCatInfoGettableInfo        = 0x0003FFFF,
  2854.     kFSCatInfoSettableInfo        = 0x00001FE3,                    /* flags, dates, permissions, Finder info, text encoding */
  2855.     kFSCatInfoReserved            = (long)0xFFFC0000                /* bits that are currently reserved */
  2856. };
  2857.  
  2858. /*    Constants for nodeFlags field of FSCatalogInfo*/
  2859. enum {
  2860.     kFSNodeLockedBit            = 0,
  2861.     kFSNodeLockedMask            = 0x0001,
  2862.     kFSNodeIsDirectoryBit        = 4,
  2863.     kFSNodeIsDirectoryMask        = 0x0010
  2864. };
  2865.  
  2866.  
  2867. struct FSCatalogInfo {
  2868.     UInt16                             nodeFlags;                    /* node flags */
  2869.     FSVolumeRefNum                     volume;                        /* object's volume ref */
  2870.     UInt32                             parentDirID;                /* parent directory's ID */
  2871.     UInt32                             nodeID;                        /* file/directory ID */
  2872.     UInt8                             sharingFlags;                /* kioFlAttribMountedBit and kioFlAttribSharePointBit */
  2873.     UInt8                             userPrivileges;                /* user's effective AFP privileges (same as ioACUser) */
  2874.     UInt8                             reserved1;
  2875.     UInt8                             reserved2;
  2876.     UTCDateTime                     createDate;                    /* date and time of creation */
  2877.     UTCDateTime                     contentModDate;                /* date and time of last fork modification */
  2878.     UTCDateTime                     attributeModDate;            /* date and time of last attribute modification */
  2879.     UTCDateTime                     accessDate;                    /* date and time of last access (for Mac OS X) */
  2880.     UTCDateTime                     backupDate;                    /* date and time of last backup */
  2881.  
  2882.     UInt32                             permissions[4];                /* permissions (for Mac OS X) */
  2883.  
  2884.     UInt8                             finderInfo[16];                /* Finder information part 1 */
  2885.     UInt8                             extFinderInfo[16];            /* Finder information part 2 */
  2886.  
  2887.     UInt64                             dataLogicalSize;            /* files only */
  2888.     UInt64                             dataPhysicalSize;            /* files only */
  2889.     UInt64                             rsrcLogicalSize;            /* files only */
  2890.     UInt64                             rsrcPhysicalSize;            /* files only */
  2891.  
  2892.     UInt32                             valence;                    /* folders only */
  2893.     TextEncoding                     textEncodingHint;
  2894. };
  2895. typedef struct FSCatalogInfo            FSCatalogInfo;
  2896. typedef FSCatalogInfo *                    FSCatalogInfoPtr;
  2897.  
  2898. struct FSRefParam {
  2899.     QElemPtr                         qLink;                        /*queue link in header*/
  2900.     short                             qType;                        /*type byte for safety check*/
  2901.     short                             ioTrap;                        /*FS: the Trap*/
  2902.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  2903.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  2904.     volatile OSErr                     ioResult;                    /*result code*/
  2905.     ConstStringPtr                     ioNamePtr;                    /*ptr to Vol:FileName string*/
  2906.     short                             ioVRefNum;                    /*volume refnum (DrvNum for Eject and MountVol)*/
  2907.  
  2908.     SInt16                             reserved1;                    /* was ioRefNum */
  2909.     UInt8                             reserved2;                    /* was ioVersNum */
  2910.     UInt8                             reserved3;                    /* was ioPermssn */
  2911.  
  2912.     const FSRef *                    ref;                        /* Input ref; the target of the call */
  2913.     FSCatalogInfoBitmap             whichInfo;
  2914.     FSCatalogInfo *                    catInfo;
  2915.     UniCharCount                     nameLength;
  2916.     UniChar *                        name;
  2917.     long                             ioDirID;
  2918.     FSSpec *                        spec;
  2919.     FSRef *                            parentRef;                    /* ref of directory to move another ref to */
  2920.     FSRef *                            newRef;                        /* Output ref */
  2921.     TextEncoding                     textEncodingHint;            /* for Rename, MakeFSRefUnicode */
  2922. };
  2923. typedef struct FSRefParam                FSRefParam;
  2924. typedef FSRefParam *                    FSRefParamPtr;
  2925. enum {
  2926.                                                                 /* CatalogSearch constants */
  2927.     fsSBNodeID                    = 0x00008000,                    /* search by range of nodeID */
  2928.     fsSBAttributeModDate        = 0x00010000,                    /* search by range of attributeModDate */
  2929.     fsSBAccessDate                = 0x00020000,                    /* search by range of accessDate */
  2930.     fsSBPermissions                = 0x00040000,                    /* search by value/mask of permissions */
  2931.     fsSBNodeIDBit                = 15,
  2932.     fsSBAttributeModDateBit        = 16,
  2933.     fsSBAccessDateBit            = 17,
  2934.     fsSBPermissionsBit            = 18
  2935. };
  2936.  
  2937.  
  2938. struct FSSearchParams {
  2939.     Duration                         searchTime;                    /* a Time Manager duration */
  2940.     OptionBits                         searchBits;                    /* which fields to search on */
  2941.     UniCharCount                     searchNameLength;
  2942.     UniChar *                        searchName;
  2943.     FSCatalogInfo *                    searchInfo1;                /* values and lower bounds */
  2944.     FSCatalogInfo *                    searchInfo2;                /* masks and upper bounds */
  2945. };
  2946. typedef struct FSSearchParams            FSSearchParams;
  2947. typedef FSSearchParams *                FSSearchParamsPtr;
  2948.  
  2949. struct FSCatalogBulkParam {
  2950.     QElemPtr                         qLink;                        /*queue link in header*/
  2951.     short                             qType;                        /*type byte for safety check*/
  2952.     short                             ioTrap;                        /*FS: the Trap*/
  2953.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  2954.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  2955.     volatile OSErr                     ioResult;                    /*result code*/
  2956.     UInt16                             reserved;                    /* make following fields 4-byte aligned */
  2957.  
  2958.     ItemCount                         maximumItems;
  2959.     ItemCount                         actualItems;
  2960.     const FSRef *                    container;                    /* directory/volume to iterate */
  2961.     FSCatalogInfoBitmap             whichInfo;
  2962.     FSCatalogInfo *                    catalogInfo;                /* returns an array */
  2963.     FSRef *                            refs;                        /* returns an array */
  2964.     FSSpec *                        specs;                        /* returns an array */
  2965.     UniCharCount *                    nameLengths;                /* returns an array */
  2966.     UniCharPtr *                    names;                        /* returns array of UniCharPtr */
  2967.     UniCharCount                     nameBufferLength;
  2968.     UniChar *                        nameBuffer;
  2969.     CatPositionRec                     catalogPosition;
  2970.     const FSSearchParams *            searchParams;
  2971. };
  2972. typedef struct FSCatalogBulkParam        FSCatalogBulkParam;
  2973. typedef FSCatalogBulkParam *            FSCatalogBulkParamPtr;
  2974.  
  2975. typedef UInt16                             FSAllocationFlags;
  2976. enum {
  2977.     kFSAllocDefaultFlags        = 0x0000,                        /* as much as possible, not contiguous */
  2978.     kFSAllocAllOrNothingMask    = 0x0001,                        /* allocate all of the space, or nothing */
  2979.     kFSAllocContiguousMask        = 0x0002,                        /* new space must be one contiguous piece */
  2980.     kFSAllocNoRoundUpMask        = 0x0004,                        /* don't round up allocation to clump size */
  2981.     kFSAllocReservedMask        = 0xFFF8                        /* these bits are reserved and must not be set */
  2982. };
  2983.  
  2984. enum {
  2985.     kFSResourceForkNameLength    = 13
  2986. };
  2987.  
  2988. #define kFSResourceForkNameMacro ((const UniChar *) "\000R\000E\000S\000O\000U\000R\000C\000E\000_\000F\000O\000R\000K")
  2989.  
  2990. struct FSForkIOParam {
  2991.     QElemPtr                         qLink;                        /*queue link in header*/
  2992.     short                             qType;                        /*type byte for safety check*/
  2993.     short                             ioTrap;                        /*FS: the Trap*/
  2994.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  2995.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  2996.     volatile OSErr                     ioResult;                    /*result code*/
  2997.     void *                            reserved1;                    /* was ioNamePtr */
  2998.     SInt16                             reserved2;                    /* was ioVRefNum */
  2999.     SInt16                             forkRefNum;                    /* same as ioRefNum */
  3000.     UInt8                             reserved3;                    /* was ioVersNum */
  3001.     SInt8                             permissions;                /* DO NOT MOVE THIS FIELD */
  3002.     const FSRef *                    ref;                        /* which object to open */
  3003.  
  3004.  
  3005.     Ptr                             buffer;                        /*data buffer Ptr*/
  3006.     UInt32                             requestCount;                /*requested byte count*/
  3007.     UInt32                             actualCount;                /*actual byte count completed*/
  3008.     UInt16                             positionMode;                /*initial file positioning*/
  3009.     SInt64                             positionOffset;                /*file position offset*/
  3010.  
  3011.     FSAllocationFlags                 allocationFlags;
  3012.     UInt64                             allocationAmount;
  3013.  
  3014.     UniCharCount                     forkNameLength;                /* length of fork name */
  3015.     UniChar *                        forkName;                    /* name of fork */
  3016.  
  3017.     CatPositionRec                     forkIterator;
  3018. };
  3019. typedef struct FSForkIOParam            FSForkIOParam;
  3020. typedef FSForkIOParam *                    FSForkIOParamPtr;
  3021.  
  3022. struct FSForkInfo {
  3023.     SInt8                             flags;                        /* copy of FCB flags */
  3024.     SInt8                             permissions;
  3025.     UInt16                             reserved1;
  3026.     UInt32                             reserved2;
  3027.     UInt32                             nodeID;                        /* file or directory ID */
  3028.     UInt32                             forkID;                        /* fork ID */
  3029.     UInt64                             currentPosition;
  3030.     UInt64                             logicalEOF;
  3031.     UInt64                             physicalEOF;
  3032.     UInt64                             process;                    /* should be ProcessSerialNumber */
  3033. };
  3034. typedef struct FSForkInfo                FSForkInfo;
  3035. typedef FSForkInfo *                    FSForkInfoPtr;
  3036. enum {
  3037.     kFSIterateForkRefNum        = 0,                            /* Iterate over all fork refnums */
  3038.     kFSUseForkRefNum            = -1                            /* Use a given fork refnum instead of iterating */
  3039. };
  3040.  
  3041.  
  3042. struct FSForkCBInfoParam {
  3043.     QElemPtr                         qLink;                        /*queue link in header*/
  3044.     short                             qType;                        /*type byte for safety check*/
  3045.     short                             ioTrap;                        /*FS: the Trap*/
  3046.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  3047.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  3048.     volatile OSErr                     ioResult;                    /*result code*/
  3049.     SInt16                             desiredRefNum;                /* 0 to iterate, non-0 for specific refnum */
  3050.     SInt16                             volumeRefNum;                /* volume to match, or 0 for all volumes */
  3051.     SInt16                             iterator;                    /* 0 to start iteration */
  3052.     SInt16                             actualRefNum;                /* actual refnum found */
  3053.  
  3054.     FSRef *                            ref;
  3055.     FSForkInfo *                    forkInfo;
  3056.     UniCharCount                     forkNameLength;
  3057.     UniChar *                        forkName;
  3058. };
  3059. typedef struct FSForkCBInfoParam        FSForkCBInfoParam;
  3060. typedef FSForkCBInfoParam *                FSForkCBInfoParamPtr;
  3061. /*
  3062.       MakeFSRef
  3063.       Create an FSRef for an existing object specified by a combination
  3064.       of volume refnum, parent directory, and pathname.
  3065.       ->    ioCompletion    A pointer to a completion routine
  3066.       <-    ioResult        The result code of the function
  3067.       ->    ioNamePtr        A pointer to a pathname
  3068.       ->    ioVRefNum        A volume specification
  3069.       ->    ioDirID            A directory ID
  3070.       <-    newRef            A pointer to an FSRef
  3071. */
  3072. EXTERN_API_C( OSErr )
  3073. FSpMakeFSRef                    (const FSSpec *            source,
  3074.                                  FSRef *                newRef);
  3075.  
  3076.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3077.                                                                                             #pragma parameter __D0 PBMakeFSRefSync(__A0)
  3078.                                                                                             #endif
  3079. EXTERN_API( OSErr )
  3080. PBMakeFSRefSync                    (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x706E, 0xA260);
  3081.  
  3082.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3083.                                                                                             #pragma parameter PBMakeFSRefAsync(__A0)
  3084.                                                                                             #endif
  3085. EXTERN_API( void )
  3086. PBMakeFSRefAsync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x706E, 0xA660);
  3087.  
  3088.  
  3089. /*
  3090.       MakeFSRefUnicode
  3091.       Create an FSRef for an existing object specified by 
  3092.       Parent FSRef and Unicode name.
  3093.       ->    ioCompletion    A pointer to a completion routine
  3094.       <-    ioResult        The result code of the function
  3095.       ->    ref                A pointer to the parent directory FSRef
  3096.       ->    name            A pointer to Unicde name
  3097.       ->    nameLength        The length of the Unicode Name
  3098.     ->  textEncodingHint A suggested text encoding to use for the name
  3099.       <-    newRef            A pointer to an FSRef
  3100. */
  3101. EXTERN_API_C( OSErr )
  3102. FSMakeFSRefUnicode                (const FSRef *            parentRef,
  3103.                                  UniCharCount             nameLength,
  3104.                                  const UniChar *        name,
  3105.                                  TextEncoding             textEncodingHint,
  3106.                                  FSRef *                newRef);
  3107.  
  3108.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3109.                                                                                             #pragma parameter __D0 PBMakeFSRefUnicodeSync(__A0)
  3110.                                                                                             #endif
  3111. EXTERN_API( OSErr )
  3112. PBMakeFSRefUnicodeSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707A, 0xA260);
  3113.  
  3114.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3115.                                                                                             #pragma parameter PBMakeFSRefUnicodeAsync(__A0)
  3116.                                                                                             #endif
  3117. EXTERN_API( void )
  3118. PBMakeFSRefUnicodeAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707A, 0xA660);
  3119.  
  3120.  
  3121. /*
  3122.       CompareFSRefs
  3123.       Test whether two FSRefs refer to the same file or directory.
  3124.       If they do, noErr is returned.  Otherwise, an appropriate error
  3125.       (such as errFSRefsDifferent) is returned.
  3126.       ->    ioCompletion    A pointer to a completion routine
  3127.       <-    ioResult        The result code of the function
  3128.       ->    ref                A pointer to the first FSRef
  3129.       ->    parentRef        A pointer to the second FSRef
  3130. */
  3131. EXTERN_API_C( OSErr )
  3132. FSCompareFSRefs                    (const FSRef *            ref1,
  3133.                                  const FSRef *            ref2);
  3134.  
  3135.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3136.                                                                                             #pragma parameter __D0 PBCompareFSRefsSync(__A0)
  3137.                                                                                             #endif
  3138. EXTERN_API( OSErr )
  3139. PBCompareFSRefsSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707C, 0xA260);
  3140.  
  3141.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3142.                                                                                             #pragma parameter PBCompareFSRefsAsync(__A0)
  3143.                                                                                             #endif
  3144. EXTERN_API( void )
  3145. PBCompareFSRefsAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x707C, 0xA660);
  3146.  
  3147.  
  3148. /*
  3149.       CreateFileUnicode
  3150.       Creates a new file.  The input filename is in Unicode.
  3151.       You can optionally set catalog info for the file.
  3152.       ->    ioCompletion    A pointer to a completion routine
  3153.       <-    ioResult        The result code of the function
  3154.       ->    ref                The directory where the file is to be created
  3155.       ->    whichInfo        Which catalog info fields to set
  3156.       ->    catInfo            The values for catalog info fields to set; may be NULL
  3157.       ->    nameLength        Number of Unicode characters in the file's name
  3158.       ->    name            A pointer to the Unicode name
  3159.       <-    newRef            A pointer to the FSRef for the new file; may be NULL
  3160. */
  3161. EXTERN_API_C( OSErr )
  3162. FSCreateFileUnicode                (const FSRef *            parentRef,
  3163.                                  UniCharCount             nameLength,
  3164.                                  const UniChar *        name,
  3165.                                  FSCatalogInfoBitmap     whichInfo,
  3166.                                  const FSCatalogInfo *    catalogInfo, /* can be NULL */
  3167.                                  FSRef *                newRef) /* can be NULL */;
  3168.  
  3169.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3170.                                                                                             #pragma parameter __D0 PBCreateFileUnicodeSync(__A0)
  3171.                                                                                             #endif
  3172. EXTERN_API( OSErr )
  3173. PBCreateFileUnicodeSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7070, 0xA260);
  3174.  
  3175.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3176.                                                                                             #pragma parameter PBCreateFileUnicodeAsync(__A0)
  3177.                                                                                             #endif
  3178. EXTERN_API( void )
  3179. PBCreateFileUnicodeAsync        (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7070, 0xA660);
  3180.  
  3181.  
  3182. /*
  3183.       CreateDirectoryUnicode
  3184.       Creates a new directory.  The input directory name is in Unicode.
  3185.       You can optionally set catalog info for the directory.
  3186.       ->    ioCompletion    A pointer to a completion routine
  3187.       <-    ioResult        The result code of the function
  3188.       ->    ref                The parent directory where the directory is to be created
  3189.       ->    whichInfo        Which catalog info fields to set
  3190.       ->    catInfo            The values for catalog info fields to set; may be NULL
  3191.       ->    nameLength        Number of Unicode characters in the directory's name
  3192.       ->    name            A pointer to the Unicode name
  3193.       <-    newRef            A pointer to the FSRef for the new directory; may be NULL
  3194. */
  3195. EXTERN_API_C( OSErr )
  3196. FSCreateDirectoryUnicode        (const FSRef *            parentRef,
  3197.                                  UniCharCount             nameLength,
  3198.                                  const UniChar *        name,
  3199.                                  FSCatalogInfoBitmap     whichInfo,
  3200.                                  const FSCatalogInfo *    catalogInfo, /* can be NULL */
  3201.                                  FSRef *                newRef) /* can be NULL */;
  3202.  
  3203.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3204.                                                                                             #pragma parameter __D0 PBCreateDirectoryUnicodeSync(__A0)
  3205.                                                                                             #endif
  3206. EXTERN_API( OSErr )
  3207. PBCreateDirectoryUnicodeSync    (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7071, 0xA260);
  3208.  
  3209.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3210.                                                                                             #pragma parameter PBCreateDirectoryUnicodeAsync(__A0)
  3211.                                                                                             #endif
  3212. EXTERN_API( void )
  3213. PBCreateDirectoryUnicodeAsync    (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7071, 0xA660);
  3214.  
  3215.  
  3216. /*
  3217.       DeleteObject
  3218.       Deletes an existing file or directory.
  3219.       ->    ioCompletion    A pointer to a completion routine
  3220.       <-    ioResult        The result code of the function
  3221.       ->    ref                The file or directory to be deleted
  3222. */
  3223. EXTERN_API_C( OSErr )
  3224. FSDeleteObject                    (const FSRef *            ref);
  3225.  
  3226.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3227.                                                                                             #pragma parameter __D0 PBDeleteObjectSync(__A0)
  3228.                                                                                             #endif
  3229. EXTERN_API( OSErr )
  3230. PBDeleteObjectSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7072, 0xA260);
  3231.  
  3232.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3233.                                                                                             #pragma parameter PBDeleteObjectAsync(__A0)
  3234.                                                                                             #endif
  3235. EXTERN_API( void )
  3236. PBDeleteObjectAsync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7072, 0xA660);
  3237.  
  3238.  
  3239. /*
  3240.       MoveObject
  3241.       Move an existing file or directory into a different directory.
  3242.       ->    ioCompletion    A pointer to a completion routine
  3243.       <-    ioResult        The result code of the function
  3244.       ->    ref                The file or directory to be moved
  3245.       ->    parentRef        The file or directory will be moved into this directory
  3246.       <-    newRef            A new FSRef for the file or directory in its new location;
  3247.                           optional, may be NULL
  3248.       NOTE: Moving an object may change its FSRef.  If you want to continue to
  3249.       refer to the object, you should pass a non-NULL pointer in newRef and use
  3250.       that returned FSRef to access the object after the move.  The FSRef passed
  3251.       in "ref" may or may not be usable to access the object after it is moved.
  3252.       "newRef" may point to the same storage as "parentRef" or "ref".
  3253. */
  3254. EXTERN_API_C( OSErr )
  3255. FSMoveObject                    (const FSRef *            ref,
  3256.                                  const FSRef *            destDirectory,
  3257.                                  FSRef *                newRef) /* can be NULL */;
  3258.  
  3259.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3260.                                                                                             #pragma parameter __D0 PBMoveObjectSync(__A0)
  3261.                                                                                             #endif
  3262. EXTERN_API( OSErr )
  3263. PBMoveObjectSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7073, 0xA260);
  3264.  
  3265.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3266.                                                                                             #pragma parameter PBMoveObjectAsync(__A0)
  3267.                                                                                             #endif
  3268. EXTERN_API( void )
  3269. PBMoveObjectAsync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7073, 0xA660);
  3270.  
  3271.  
  3272. /*
  3273.       ExchangeObjects
  3274.       swap the contents of two files.
  3275.       ->    ioCompletion    A pointer to a completion routine
  3276.       <-    ioResult        The result code of the function
  3277.       ->    ref                The first file 
  3278.       ->    parentRef        The second file 
  3279. */
  3280. EXTERN_API_C( OSErr )
  3281. FSExchangeObjects                (const FSRef *            ref,
  3282.                                  const FSRef *            destRef);
  3283.  
  3284.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3285.                                                                                             #pragma parameter __D0 PBExchangeObjectsSync(__A0)
  3286.                                                                                             #endif
  3287. EXTERN_API( OSErr )
  3288. PBExchangeObjectsSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7075, 0xA260);
  3289.  
  3290.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3291.                                                                                             #pragma parameter PBExchangeObjectsAsync(__A0)
  3292.                                                                                             #endif
  3293. EXTERN_API( void )
  3294. PBExchangeObjectsAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7075, 0xA660);
  3295.  
  3296.  
  3297. /*
  3298.       RenameUnicode
  3299.       Change the name of an existing file or directory.  The new name is in
  3300.       Unicode.
  3301.       ->    ioCompletion    A pointer to a completion routine
  3302.       <-    ioResult        The result code of the function
  3303.       ->    ref                The file or directory to be moved
  3304.       ->    nameLength        Number of Unicode characters in the new name
  3305.       ->    name            A pointer to the new Unicode name
  3306.     ->  textEncodingHint A suggested text encoding to use for the name
  3307.       <-    newRef            A new FSRef for the file or directory; may be NULL
  3308.       NOTE: Renaming an object may change its FSRef.  If you want to continue to
  3309.       refer to the object, you should pass a non-NULL pointer in newRef and use
  3310.       that returned FSRef to access the object after the rename.  The FSRef passed
  3311.       in "ref" may or may not be usable to access the object after it is renamed.
  3312.       "newRef" may point to the same storage as "ref".
  3313. */
  3314. EXTERN_API_C( OSErr )
  3315. FSRenameUnicode                    (const FSRef *            ref,
  3316.                                  UniCharCount             nameLength,
  3317.                                  const UniChar *        name,
  3318.                                  TextEncoding             textEncodingHint,
  3319.                                  FSRef *                newRef) /* can be NULL */;
  3320.  
  3321.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3322.                                                                                             #pragma parameter __D0 PBRenameUnicodeSync(__A0)
  3323.                                                                                             #endif
  3324. EXTERN_API( OSErr )
  3325. PBRenameUnicodeSync                (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7074, 0xA260);
  3326.  
  3327.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3328.                                                                                             #pragma parameter PBRenameUnicodeAsync(__A0)
  3329.                                                                                             #endif
  3330. EXTERN_API( void )
  3331. PBRenameUnicodeAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7074, 0xA660);
  3332.  
  3333.  
  3334. /*
  3335.       GetCatalogInfo
  3336.       Returns various information about a given file or directory.
  3337.       ->    ioCompletion    A pointer to a completion routine
  3338.       <-    ioResult        The result code of the function
  3339.       ->    ref                The file or directory whose information is to be returned
  3340.       ->    whichInfo        Which catalog info fields to get
  3341.       <-    catInfo            The returned values of catalog info fields; may be NULL
  3342.       <-    nameLength        The actual length of the object's name
  3343.       <-    name            The Unicode name is returned here.  This pointer may be NULL;
  3344.                           if not, it must point to room for at least 255 Unicode chars.
  3345.       <-    spec            A pointer to the FSSpec for the object; may be NULL
  3346.       <-    parentRef        A pointer to the FSRef for the object's parent directory; may be NULL
  3347.       Note: All of the outputs are optional; if you don't want that particular output, just
  3348.       set its pointer to NULL.  This is the call to use to map from an FSRef to an FSSpec.
  3349. */
  3350. EXTERN_API_C( OSErr )
  3351. FSGetCatalogInfo                (const FSRef *            ref,
  3352.                                  FSCatalogInfoBitmap     whichInfo,
  3353.                                  FSCatalogInfo *        catalogInfo, /* can be NULL */
  3354.                                  UniChar *                name, /* can be NULL */
  3355.                                  UniCharCount *            nameLength, /* can be NULL */
  3356.                                  FSSpec *                fsSpec, /* can be NULL */
  3357.                                  FSRef *                parentRef) /* can be NULL */;
  3358.  
  3359.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3360.                                                                                             #pragma parameter __D0 PBGetCatalogInfoSync(__A0)
  3361.                                                                                             #endif
  3362. EXTERN_API( OSErr )
  3363. PBGetCatalogInfoSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7076, 0xA260);
  3364.  
  3365.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3366.                                                                                             #pragma parameter PBGetCatalogInfoAsync(__A0)
  3367.                                                                                             #endif
  3368. EXTERN_API( void )
  3369. PBGetCatalogInfoAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7076, 0xA660);
  3370.  
  3371.  
  3372. /*
  3373.       SetCatalogInfo
  3374.       Set catalog information about a given file or directory.
  3375.       ->    ioCompletion    A pointer to a completion routine
  3376.       <-    ioResult        The result code of the function
  3377.       ->    ref                The file or directory whose information is to be changed
  3378.       ->    whichInfo        Which catalog info fields to set
  3379.       ->    catInfo            The new values of catalog info fields
  3380.       Note: Only some of the catalog info fields may be set.  The settable fields
  3381.       are given by the constant kFSCatInfoSettableInfo; no other bits may be set in
  3382.       whichInfo.
  3383. */
  3384. EXTERN_API_C( OSErr )
  3385. FSSetCatalogInfo                (const FSRef *            ref,
  3386.                                  FSCatalogInfoBitmap     whichInfo,
  3387.                                  const FSCatalogInfo *    catalogInfo);
  3388.  
  3389.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3390.                                                                                             #pragma parameter __D0 PBSetCatalogInfoSync(__A0)
  3391.                                                                                             #endif
  3392. EXTERN_API( OSErr )
  3393. PBSetCatalogInfoSync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7077, 0xA260);
  3394.  
  3395.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3396.                                                                                             #pragma parameter PBSetCatalogInfoAsync(__A0)
  3397.                                                                                             #endif
  3398. EXTERN_API( void )
  3399. PBSetCatalogInfoAsync            (FSRefParam *            paramBlock)                            TWOWORDINLINE(0x7077, 0xA660);
  3400.  
  3401.  
  3402. /*
  3403.       GetCatalogInfoBulk
  3404.       Returns various information about the items in a given directory.
  3405.       ->    ioCompletion    A pointer to a completion routine
  3406.       <-    ioResult        The result code of the function
  3407.       ->    maximumItems    The maximum number of items to return
  3408.       <-    actualItems        The actual number of items returned
  3409.       ->    container        The directory whose contents will be returned
  3410.       ->    whichInfo        The catalog information fields to return for each item
  3411.       <-    catalogInfo        An array of catalog information; one for each returned item
  3412.       <-    refs            An array of FSRefs; one for each returned item
  3413.       <-    nameLengths        An array of lengths (in Unicode characters) of each returned name
  3414.       <-    names            An array of pointers for each returned name
  3415.       ->    nameBufferLength  The length (in Unicode characters) of nameBuffer
  3416.       ->    nameBuffer        A buffer to be used to store returned names
  3417.       <>    catalogPosition    Keeps state between calls for a given directory; on the first call
  3418.                           for a given directory, set the initialize field to zero.
  3419.       Note: The catalogInfo, refs, and names are all optional outputs; if you don't want that
  3420.       particular output, set its pointer to NULL.  (If you don't want names returned, you can
  3421.       set nameLengths, names, nameBuffer to NULL and nameBufferLength to zero.)
  3422. */
  3423. EXTERN_API_C( OSErr )
  3424. FSGetCatalogInfoBulk            (const FSRef *            directory,
  3425.                                  CatPositionRec *        catalogPosition,
  3426.                                  ItemCount                 maximumObjects,
  3427.                                  ItemCount *            actualObjects,
  3428.                                  FSCatalogInfoBitmap     whichInfo,
  3429.                                  FSCatalogInfo *        catalogInfos, /* can be NULL */
  3430.                                  FSRef *                refs, /* can be NULL */
  3431.                                  FSSpec *                specs, /* can be NULL */
  3432.                                  UniCharCount *            nameLengths, /* can be NULL */
  3433.                                  UniCharPtr *            names, /* can be NULL */
  3434.                                  UniChar *                nameBuffer, /* can be NULL */
  3435.                                  UniCharCount             nameBufferSize);
  3436.  
  3437.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3438.                                                                                             #pragma parameter __D0 PBGetCatalogInfoBulkSync(__A0)
  3439.                                                                                             #endif
  3440. EXTERN_API( OSErr )
  3441. PBGetCatalogInfoBulkSync        (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x7078, 0xA260);
  3442.  
  3443.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3444.                                                                                             #pragma parameter PBGetCatalogInfoBulkAsync(__A0)
  3445.                                                                                             #endif
  3446. EXTERN_API( void )
  3447. PBGetCatalogInfoBulkAsync        (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x7078, 0xA660);
  3448.  
  3449. /*
  3450.       CatalogSearch
  3451.       Searchs a volume for files and/or directories that match certain criteria.  Return
  3452.       various information about the matching items.
  3453.       ->    ioCompletion    A pointer to a completion routine
  3454.       <-    ioResult        The result code of the function
  3455.       ->    maximumItems    The maximum number of items to return
  3456.       <-    actualItems        The actual number of items returned
  3457.       ->    container        The volume whose contents will be searched
  3458.       ->    whichInfo        The catalog information fields to return for each item
  3459.       <-    catalogInfo        An array of catalog information; one for each returned item
  3460.       <-    refs            An array of FSRefs; one for each returned item
  3461.       <-    nameLengths        An array of lengths (in Unicode characters) of each returned name
  3462.       <-    names            An array of pointers for each returned name
  3463.       ->    nameBufferLength  The length (in Unicode characters) of nameBuffer
  3464.       ->    nameBuffer        A buffer to be used to store returned names
  3465.       <>    catalogPosition    Keeps state between calls for a given volume; on the first call
  3466.                           for a given directory, set the initialize field to zero.
  3467.       ->    searchParams    The criteria that controls the matching, including timeout, a bitmap
  3468.                           controlling the fields to compare, and the (Unicode) name to compare.
  3469.       Note: The catalogInfo, refs, and names are all optional outputs; if you don't want that
  3470.       particular output, set its pointer to NULL.  (If you don't want names returned, you can
  3471.       set nameLengths, names, nameBuffer to NULL and nameBufferLength to zero.)
  3472. */
  3473. EXTERN_API_C( OSErr )
  3474. FSCatalogSearch                    (const FSRef *            volume,
  3475.                                  const FSSearchParams *    searchCriteria,
  3476.                                  CatPositionRec *        catalogPosition,
  3477.                                  ItemCount                 maximumObjects,
  3478.                                  ItemCount *            actualObjects,
  3479.                                  FSCatalogInfoBitmap     whichInfo,
  3480.                                  FSCatalogInfo *        catalogInfos, /* can be NULL */
  3481.                                  FSRef *                refs, /* can be NULL */
  3482.                                  FSSpec *                specs, /* can be NULL */
  3483.                                  UniCharCount *            nameLengths, /* can be NULL */
  3484.                                  UniCharPtr *            names, /* can be NULL */
  3485.                                  UniChar *                nameBuffer, /* can be NULL */
  3486.                                  UniCharCount             nameBufferSize);
  3487.  
  3488.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3489.                                                                                             #pragma parameter __D0 PBCatalogSearchSync(__A0)
  3490.                                                                                             #endif
  3491. EXTERN_API( OSErr )
  3492. PBCatalogSearchSync                (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x707B, 0xA260);
  3493.  
  3494.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3495.                                                                                             #pragma parameter PBCatalogSearchAsync(__A0)
  3496.                                                                                             #endif
  3497. EXTERN_API( void )
  3498. PBCatalogSearchAsync            (FSCatalogBulkParam *    paramBlock)                            TWOWORDINLINE(0x707B, 0xA660);
  3499.  
  3500.  
  3501. /*
  3502.       CreateFork
  3503.       Create a named fork for a file or directory.
  3504.       ->    ioCompletion    A pointer to a completion routine
  3505.       <-    ioResult        The result code of the function
  3506.       ->    ref                The file or directory
  3507.       ->    forkNameLength    The length of the fork name (in Unicode characters)
  3508.       ->    forkName        The name of the fork to open (in Unicode)
  3509. */
  3510. EXTERN_API_C( OSErr )
  3511. FSCreateFork                    (const FSRef *            ref,
  3512.                                  UniCharCount             forkNameLength,
  3513.                                  const UniChar *        forkName) /* can be NULL */;
  3514.  
  3515.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3516.                                                                                             #pragma parameter __D0 PBCreateForkSync(__A0)
  3517.                                                                                             #endif
  3518. EXTERN_API( OSErr )
  3519. PBCreateForkSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707D, 0xA260);
  3520.  
  3521.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3522.                                                                                             #pragma parameter PBCreateForkAsync(__A0)
  3523.                                                                                             #endif
  3524. EXTERN_API( void )
  3525. PBCreateForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707D, 0xA660);
  3526.  
  3527.  
  3528. /*
  3529.       DeleteFork
  3530.       Delete a named fork of a file or directory.
  3531.       ->    ioCompletion    A pointer to a completion routine
  3532.       <-    ioResult        The result code of the function
  3533.       ->    ref                The file or directory
  3534.       ->    forkNameLength    The length of the fork name (in Unicode characters)
  3535.       ->    forkName        The name of the fork to open (in Unicode)
  3536. */
  3537. EXTERN_API_C( OSErr )
  3538. FSDeleteFork                    (const FSRef *            ref,
  3539.                                  UniCharCount             forkNameLength,
  3540.                                  const UniChar *        forkName) /* can be NULL */;
  3541.  
  3542.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3543.                                                                                             #pragma parameter __D0 PBDeleteForkSync(__A0)
  3544.                                                                                             #endif
  3545. EXTERN_API( OSErr )
  3546. PBDeleteForkSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707E, 0xA260);
  3547.  
  3548.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3549.                                                                                             #pragma parameter PBDeleteForkAsync(__A0)
  3550.                                                                                             #endif
  3551. EXTERN_API( void )
  3552. PBDeleteForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707E, 0xA660);
  3553.  
  3554.  
  3555. /*
  3556.       IterateForks
  3557.       Return the names and sizes of the forks of a file or directory.
  3558.       One fork is returned per call.
  3559.       ->    ioCompletion    A pointer to a completion routine.
  3560.       <-    ioResult        The result code of the function.
  3561.       ->    ref                The file or directory containing the forks.
  3562.       <-    positionOffset    The length of the fork, in bytes.
  3563.       <-    allocationAmount The space allocated to the fork (physical length).
  3564.       <-    forkNameLength    The length of the fork name (in Unicode characters).
  3565.       <-    forkName        The name of the fork in Unicode.
  3566.       <>    forkIterator    Maintains state between calls for a given FSRef.
  3567.                           Before the first call, set the initialize field to zero.
  3568. */
  3569. EXTERN_API_C( OSErr )
  3570. FSIterateForks                    (const FSRef *            ref,
  3571.                                  CatPositionRec *        forkIterator,
  3572.                                  UniCharCount *            forkNameLength, /* can be NULL */
  3573.                                  UniChar *                forkName, /* can be NULL */
  3574.                                  SInt64 *                forkSize, /* can be NULL */
  3575.                                  UInt64 *                forkPhysicalSize) /* can be NULL */;
  3576.  
  3577.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3578.                                                                                             #pragma parameter __D0 PBIterateForksSync(__A0)
  3579.                                                                                             #endif
  3580. EXTERN_API( OSErr )
  3581. PBIterateForksSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707F, 0xA260);
  3582.  
  3583.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3584.                                                                                             #pragma parameter PBIterateForksAsync(__A0)
  3585.                                                                                             #endif
  3586. EXTERN_API( void )
  3587. PBIterateForksAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x707F, 0xA660);
  3588.  
  3589.  
  3590. /*
  3591.       OpenFork
  3592.       Open a fork for reading and/or writing.  Allows the opened fork
  3593.       to grow beyond 2GB in size.  All volumes should support data and
  3594.       resource forks.  Other named forks may be supported by some
  3595.       volumes.
  3596.       ->    ioCompletion    A pointer to a completion routine
  3597.       <-    ioResult        The result code of the function
  3598.       ->    ref                The file or directory containing the fork to open
  3599.       ->    forkNameLength    The length of the fork name (in Unicode characters)
  3600.       ->    forkName        The name of the fork to open (in Unicode)
  3601.       ->    permissions        The access (read and/or write) you want
  3602.       <-    forkRefNum        The reference number for accessing the open fork
  3603. */
  3604. EXTERN_API_C( OSErr )
  3605. FSOpenFork                        (const FSRef *            ref,
  3606.                                  UniCharCount             forkNameLength,
  3607.                                  const UniChar *        forkName, /* can be NULL */
  3608.                                  SInt8                     permissions,
  3609.                                  SInt16 *                forkRefNum);
  3610.  
  3611.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3612.                                                                                             #pragma parameter __D0 PBOpenForkSync(__A0)
  3613.                                                                                             #endif
  3614. EXTERN_API( OSErr )
  3615. PBOpenForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7079, 0xA260);
  3616.  
  3617.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3618.                                                                                             #pragma parameter PBOpenForkAsync(__A0)
  3619.                                                                                             #endif
  3620. EXTERN_API( void )
  3621. PBOpenForkAsync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7079, 0xA660);
  3622.  
  3623.  
  3624. /*
  3625.       ReadFork
  3626.       Read data from a fork opened via OpenFork.  The first byte to read is
  3627.       indicated by a combination of positionMode and positionOffset.
  3628.       ->    ioCompletion    A pointer to a completion routine
  3629.       <-    ioResult        The result code of the function
  3630.       ->    forkRefNum        The reference number of the fork to read from
  3631.       <-    buffer            Pointer to buffer where data will be returned
  3632.       ->    requestCount    The number of bytes to read
  3633.       <-    actualCount        The number of bytes actually read
  3634.       ->    positionMode    The base location for start of read
  3635.       ->    positionOffset    The offset from base location for start of read
  3636. */
  3637. EXTERN_API_C( OSErr )
  3638. FSReadFork                        (SInt16                 forkRefNum,
  3639.                                  UInt16                 positionMode,
  3640.                                  SInt64                 positionOffset,
  3641.                                  ByteCount                 requestCount,
  3642.                                  void *                    buffer,
  3643.                                  ByteCount *            actualCount) /* can be NULL */;
  3644.  
  3645.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3646.                                                                                             #pragma parameter __D0 PBReadForkSync(__A0)
  3647.                                                                                             #endif
  3648. EXTERN_API( OSErr )
  3649. PBReadForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7051, 0xA260);
  3650.  
  3651.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3652.                                                                                             #pragma parameter PBReadForkAsync(__A0)
  3653.                                                                                             #endif
  3654. EXTERN_API( void )
  3655. PBReadForkAsync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7051, 0xA660);
  3656.  
  3657.  
  3658. /*
  3659.       WriteFork
  3660.       Write data to a fork opened via OpenFork.  The first byte to write is
  3661.       indicated by a combination of positionMode and positionOffset.
  3662.       ->    ioCompletion    A pointer to a completion routine
  3663.       <-    ioResult        The result code of the function
  3664.       ->    forkRefNum        The reference number of the fork to write to
  3665.       ->    buffer            Pointer to data to write
  3666.       ->    requestCount    The number of bytes to write
  3667.       <-    actualCount        The number of bytes actually written
  3668.       ->    positionMode    The base location for start of write
  3669.       ->    positionOffset    The offset from base location for start of write
  3670. */
  3671. EXTERN_API_C( OSErr )
  3672. FSWriteFork                        (SInt16                 forkRefNum,
  3673.                                  UInt16                 positionMode,
  3674.                                  SInt64                 positionOffset,
  3675.                                  ByteCount                 requestCount,
  3676.                                  void *                    buffer,
  3677.                                  ByteCount *            actualCount) /* can be NULL */;
  3678.  
  3679.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3680.                                                                                             #pragma parameter __D0 PBWriteForkSync(__A0)
  3681.                                                                                             #endif
  3682. EXTERN_API( OSErr )
  3683. PBWriteForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7052, 0xA260);
  3684.  
  3685.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3686.                                                                                             #pragma parameter PBWriteForkAsync(__A0)
  3687.                                                                                             #endif
  3688. EXTERN_API( void )
  3689. PBWriteForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7052, 0xA660);
  3690.  
  3691.  
  3692. /*
  3693.       GetForkPosition
  3694.       Get the current (default) position of a fork that was
  3695.       opened via OpenFork.
  3696.       ->    ioCompletion    A pointer to a completion routine
  3697.       <-    ioResult        The result code of the function
  3698.       ->    forkRefNum        The reference number of the fork
  3699.       <-    positionOffset    The current position of the fork
  3700. */
  3701. EXTERN_API_C( OSErr )
  3702. FSGetForkPosition                (SInt16                 forkRefNum,
  3703.                                  SInt64 *                position);
  3704.  
  3705.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3706.                                                                                             #pragma parameter __D0 PBGetForkPositionSync(__A0)
  3707.                                                                                             #endif
  3708. EXTERN_API( OSErr )
  3709. PBGetForkPositionSync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7053, 0xA260);
  3710.  
  3711.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3712.                                                                                             #pragma parameter PBGetForkPositionAsync(__A0)
  3713.                                                                                             #endif
  3714. EXTERN_API( void )
  3715. PBGetForkPositionAsync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7053, 0xA660);
  3716.  
  3717.  
  3718. /*
  3719.       SetForkPosition
  3720.       Set the current (default) position of a fork that was
  3721.       opened via OpenFork.
  3722.       ->    ioCompletion    A pointer to a completion routine
  3723.       <-    ioResult        The result code of the function
  3724.       ->    forkRefNum        The reference number of the fork
  3725.       ->    positionMode    The base location for the new position
  3726.       ->    positionOffset    The offset of the new position from the base
  3727. */
  3728. EXTERN_API_C( OSErr )
  3729. FSSetForkPosition                (SInt16                 forkRefNum,
  3730.                                  UInt16                 positionMode,
  3731.                                  SInt64                 positionOffset);
  3732.  
  3733.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3734.                                                                                             #pragma parameter __D0 PBSetForkPositionSync(__A0)
  3735.                                                                                             #endif
  3736. EXTERN_API( OSErr )
  3737. PBSetForkPositionSync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7054, 0xA260);
  3738.  
  3739.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3740.                                                                                             #pragma parameter PBSetForkPositionAsync(__A0)
  3741.                                                                                             #endif
  3742. EXTERN_API( void )
  3743. PBSetForkPositionAsync            (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7054, 0xA660);
  3744.  
  3745.  
  3746. /*
  3747.       GetForkSize
  3748.       Get the current logical size (end-of-file) of an open fork.
  3749.       ->    ioCompletion    A pointer to a completion routine
  3750.       <-    ioResult        The result code of the function
  3751.       ->    forkRefNum        The reference number of the fork
  3752.       <-    positionOffset    The logical size of the fork, in bytes
  3753. */
  3754. EXTERN_API_C( OSErr )
  3755. FSGetForkSize                    (SInt16                 forkRefNum,
  3756.                                  SInt64 *                forkSize);
  3757.  
  3758.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3759.                                                                                             #pragma parameter __D0 PBGetForkSizeSync(__A0)
  3760.                                                                                             #endif
  3761. EXTERN_API( OSErr )
  3762. PBGetForkSizeSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7055, 0xA260);
  3763.  
  3764.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3765.                                                                                             #pragma parameter PBGetForkSizeAsync(__A0)
  3766.                                                                                             #endif
  3767. EXTERN_API( void )
  3768. PBGetForkSizeAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7055, 0xA660);
  3769.  
  3770.  
  3771. /*
  3772.       SetForkSize
  3773.       Set the logical size (end-of-file) of an open fork.  This
  3774.       may cause space to be allocated or deallocated.  The new
  3775.       logical size of the fork is returned.
  3776.       ->    ioCompletion    A pointer to a completion routine
  3777.       <-    ioResult        The result code of the function
  3778.       ->    forkRefNum        The reference number of the fork
  3779.       ->    positionMode    The base location for the new size
  3780.       ->    positionOffset    The offset of the new size from the base
  3781. */
  3782. EXTERN_API_C( OSErr )
  3783. FSSetForkSize                    (SInt16                 forkRefNum,
  3784.                                  UInt16                 positionMode,
  3785.                                  SInt64                 positionOffset);
  3786.  
  3787.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3788.                                                                                             #pragma parameter __D0 PBSetForkSizeSync(__A0)
  3789.                                                                                             #endif
  3790. EXTERN_API( OSErr )
  3791. PBSetForkSizeSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7056, 0xA260);
  3792.  
  3793.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3794.                                                                                             #pragma parameter PBSetForkSizeAsync(__A0)
  3795.                                                                                             #endif
  3796. EXTERN_API( void )
  3797. PBSetForkSizeAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7056, 0xA660);
  3798.  
  3799.  
  3800. /*
  3801.       AllocateFork
  3802.       Allocate space to an open fork.  Typically, the space to be
  3803.       allocated is beyond the current size of the fork, to reserve
  3804.       space so the file will be able to grow later.  Some volume
  3805.       formats are unable to allocate space beyond the logical size
  3806.       of the fork.
  3807.       ->    ioCompletion    A pointer to a completion routine
  3808.       <-    ioResult        The result code of the function
  3809.       ->    forkRefNum        The reference number of the fork
  3810.       ->    positionMode    The base location for start of allocation
  3811.       ->    positionOffset    The offset of the start of allocation
  3812.       ->    allocationFlags    Zero or more of the following flags:
  3813.           kFSAllocContiguousMask
  3814.                   Any newly allocated space must be one contiguous piece.
  3815.           kFSAllocAllOrNothingMask
  3816.                   All of the request space must be available, or the call
  3817.                   will fail.  (If not set, the call may succeed even though
  3818.                   some of the requested space wasn't allocated.)
  3819.           kFSAllocNoRoundUpMask
  3820.                   Do not allocate additional space.  (If not set, a volume
  3821.                   may allocate additional space in order to reduce fragmentation.)
  3822.       <>    allocationAmount    The number of bytes to allocate
  3823.                               On output, the number of bytes actually added
  3824. */
  3825. EXTERN_API_C( OSErr )
  3826. FSAllocateFork                    (SInt16                 forkRefNum,
  3827.                                  FSAllocationFlags         flags,
  3828.                                  UInt16                 positionMode,
  3829.                                  SInt64                 positionOffset,
  3830.                                  UInt64                 requestCount,
  3831.                                  UInt64 *                actualCount) /* can be NULL */;
  3832.  
  3833.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3834.                                                                                             #pragma parameter __D0 PBAllocateForkSync(__A0)
  3835.                                                                                             #endif
  3836. EXTERN_API( OSErr )
  3837. PBAllocateForkSync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7057, 0xA260);
  3838.  
  3839.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3840.                                                                                             #pragma parameter PBAllocateForkAsync(__A0)
  3841.                                                                                             #endif
  3842. EXTERN_API( void )
  3843. PBAllocateForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7057, 0xA660);
  3844.  
  3845.  
  3846. /*
  3847.       FlushFork
  3848.       Flush a fork.  Any data written to this fork refnum is flushed to the device.
  3849.       The volume's control structures are also flushed to the device.
  3850.       ->    ioCompletion    A pointer to a completion routine
  3851.       <-    ioResult        The result code of the function
  3852.       ->    forkRefNum        The reference number of the fork to flush
  3853. */
  3854. EXTERN_API_C( OSErr )
  3855. FSFlushFork                        (SInt16                 forkRefNum);
  3856.  
  3857.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3858.                                                                                             #pragma parameter __D0 PBFlushForkSync(__A0)
  3859.                                                                                             #endif
  3860. EXTERN_API( OSErr )
  3861. PBFlushForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7058, 0xA260);
  3862.  
  3863.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3864.                                                                                             #pragma parameter PBFlushForkAsync(__A0)
  3865.                                                                                             #endif
  3866. EXTERN_API( void )
  3867. PBFlushForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7058, 0xA660);
  3868.  
  3869.  
  3870. /*
  3871.       CloseFork
  3872.       Flush and close a fork.  Any data written to this fork refnum is flushed
  3873.       to the device.  The volume's control structures are also flushed to the device.
  3874.       ->    ioCompletion    A pointer to a completion routine
  3875.       <-    ioResult        The result code of the function
  3876.       ->    forkRefNum        The reference number of the fork to close
  3877. */
  3878. EXTERN_API_C( OSErr )
  3879. FSCloseFork                        (SInt16                 forkRefNum);
  3880.  
  3881.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3882.                                                                                             #pragma parameter __D0 PBCloseForkSync(__A0)
  3883.                                                                                             #endif
  3884. EXTERN_API( OSErr )
  3885. PBCloseForkSync                    (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7059, 0xA260);
  3886.  
  3887.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3888.                                                                                             #pragma parameter PBCloseForkAsync(__A0)
  3889.                                                                                             #endif
  3890. EXTERN_API( void )
  3891. PBCloseForkAsync                (FSForkIOParam *        paramBlock)                            TWOWORDINLINE(0x7059, 0xA660);
  3892.  
  3893.  
  3894. /*
  3895.       GetForkCBInfo
  3896.       Return information about an open fork.
  3897.       ->    ioCompletion    A pointer to a completion routine
  3898.       <-    ioResult        The result code of the function
  3899.       <>    desiredRefNum    If non-zero on input, then get information for this refnum;
  3900.                           unchanged on output.  If zero on input, iterate over all open
  3901.                           forks (possibly limited to a single volume); on output, contains
  3902.                           the fork's refnum.
  3903.       ->    volumeRefNum    Used when desiredRefNum is zero on input.  Set to 0 to iterate over all
  3904.                           volumes, or set to a FSVolumeRefNum to limit iteration to that volume.
  3905.       <>    iterator        Used when desiredRefNum is zero on input.  Set to 0 before iterating.
  3906.                           Pass the iterator returned by the previous call to continue iterating.
  3907.       <-    actualRefNum    The refnum of the open fork.
  3908.       <-    ref                The FSRef for the file or directory that contains the fork.
  3909.       <-    forkInfo        Various information about the open fork.
  3910.       <-    forkNameLength    The length of the fork's name
  3911.       <-    forkName        The name of the fork
  3912.       Note: the foundRefNum, ref, forkInfo, and fork name outputs are all optional; if you don't want
  3913.       a particular output, then set its pointer to NULL.  If forkName is NULL, then forkNameLength
  3914.       will be undefined.
  3915.       Note: Returning the forkInfo generally does not require a disk access.  Returning the
  3916.       ref or forkName may cause disk access for some volume formats.
  3917. */
  3918. EXTERN_API_C( OSErr )
  3919. FSGetForkCBInfo                    (SInt16                 desiredRefNum,
  3920.                                  FSVolumeRefNum         volume,
  3921.                                  SInt16 *                iterator, /* can be NULL */
  3922.                                  SInt16 *                actualRefNum, /* can be NULL */
  3923.                                  FSForkInfo *            forkInfo, /* can be NULL */
  3924.                                  FSRef *                ref, /* can be NULL */
  3925.                                  UniChar *                forkName, /* can be NULL */
  3926.                                  UniCharCount *            forkNameLength) /* can be NULL */;
  3927.  
  3928.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3929.                                                                                             #pragma parameter __D0 PBGetForkCBInfoSync(__A0)
  3930.                                                                                             #endif
  3931. EXTERN_API( OSErr )
  3932. PBGetForkCBInfoSync                (FSForkCBInfoParam *    paramBlock)                            TWOWORDINLINE(0x705A, 0xA260);
  3933.  
  3934.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  3935.                                                                                             #pragma parameter PBGetForkCBInfoAsync(__A0)
  3936.                                                                                             #endif
  3937. EXTERN_API( void )
  3938. PBGetForkCBInfoAsync            (FSForkCBInfoParam *    paramBlock)                            TWOWORDINLINE(0x705A, 0xA660);
  3939.  
  3940.  
  3941. /* Volume routines*/
  3942.  
  3943.  
  3944. typedef UInt32                             FSVolumeInfoBitmap;
  3945. enum {
  3946.     kFSVolInfoNone                = 0x0000,
  3947.     kFSVolInfoCreateDate        = 0x0001,
  3948.     kFSVolInfoModDate            = 0x0002,
  3949.     kFSVolInfoBackupDate        = 0x0004,
  3950.     kFSVolInfoCheckedDate        = 0x0008,
  3951.     kFSVolInfoFileCount            = 0x0010,
  3952.     kFSVolInfoDirCount            = 0x0020,
  3953.     kFSVolInfoSizes                = 0x0040,                        /* totalBytes and freeBytes */
  3954.     kFSVolInfoBlocks            = 0x0080,                        /* blockSize, totalBlocks, freeBlocks */
  3955.     kFSVolInfoNextAlloc            = 0x0100,
  3956.     kFSVolInfoRsrcClump            = 0x0200,
  3957.     kFSVolInfoDataClump            = 0x0400,
  3958.     kFSVolInfoNextID            = 0x0800,
  3959.     kFSVolInfoFinderInfo        = 0x1000,
  3960.     kFSVolInfoFlags                = 0x2000,
  3961.     kFSVolInfoFSInfo            = 0x4000,                        /* filesystemID, signature */
  3962.     kFSVolInfoDriveInfo            = 0x8000,                        /* driveNumber, driverRefNum */
  3963.     kFSVolInfoGettableInfo        = 0xFFFF,                        /* This seems like it is here just for completeness */
  3964.     kFSVolInfoSettableInfo        = 0x3004                        /* backup date, Finder info, flags */
  3965. };
  3966.  
  3967.  
  3968.  
  3969. struct FSVolumeInfo {
  3970.                                                                 /* Dates -- zero means "never" or "unknown" */
  3971.     UTCDateTime                     createDate;
  3972.     UTCDateTime                     modifyDate;
  3973.     UTCDateTime                     backupDate;
  3974.     UTCDateTime                     checkedDate;
  3975.  
  3976.                                                                 /* File/Folder counts -- return zero if unknown */
  3977.     UInt32                             fileCount;                    /* total files on volume */
  3978.     UInt32                             folderCount;                /* total folders on volume */
  3979.                                                                 /* Note: no root directory counts */
  3980.  
  3981.     UInt64                             totalBytes;                    /* total number of bytes on volume */
  3982.     UInt64                             freeBytes;                    /* number of free bytes on volume */
  3983.  
  3984.                                                                 /* HFS and HFS Plus specific.  Set fields to zero if not appropriate */
  3985.     UInt32                             blockSize;                    /* size (in bytes) of allocation blocks */
  3986.     UInt32                             totalBlocks;                /* number of allocation blocks in volume */
  3987.     UInt32                             freeBlocks;                    /* number of unused allocation blocks */
  3988.     UInt32                             nextAllocation;                /* start of next allocation search */
  3989.     UInt32                             rsrcClumpSize;                /* default resource fork clump size */
  3990.     UInt32                             dataClumpSize;                /* default data fork clump size */
  3991.     UInt32                             nextCatalogID;                /* next unused catalog node ID ••• OYG ••• need to make HFSVolumes.h work Should be HFSCatalogNodeID*/
  3992.     UInt8                             finderInfo[32];                /* information used by Finder */
  3993.  
  3994.                                                                 /* Identifying information */
  3995.     UInt16                             flags;                        /* ioVAtrb */
  3996.     UInt16                             filesystemID;                /* ioVFSID */
  3997.     UInt16                             signature;                    /* ioVSigWord, unique within an FSID */
  3998.     UInt16                             driveNumber;                /* ioVDrvInfo */
  3999.     short                             driverRefNum;                /* ioVDRefNum */
  4000. };
  4001. typedef struct FSVolumeInfo                FSVolumeInfo;
  4002. typedef FSVolumeInfo *                    FSVolumeInfoPtr;
  4003.  
  4004. struct FSVolumeInfoParam {
  4005.     QElemPtr                         qLink;                        /*queue link in header*/
  4006.     short                             qType;                        /*type byte for safety check*/
  4007.     short                             ioTrap;                        /*FS: the Trap*/
  4008.     Ptr                             ioCmdAddr;                    /*FS: address to dispatch to*/
  4009.     IOCompletionUPP                 ioCompletion;                /*completion routine addr (0 for synch calls)*/
  4010.     volatile OSErr                     ioResult;                    /*result code*/
  4011.     StringPtr                         ioNamePtr;                    /* unused */
  4012.     FSVolumeRefNum                     ioVRefNum;                    /* volume refnum */
  4013.  
  4014.     UInt32                             volumeIndex;                /* index, or 0 to use ioVRefNum */
  4015.     FSVolumeInfoBitmap                 whichInfo;                    /* which volumeInfo fields to get/set */
  4016.     FSVolumeInfo *                    volumeInfo;                    /* information about the volume */
  4017.     UniCharCount                     nameLength;                    /* actual length of volume name */
  4018.     UniChar *                        name;                        /* pointer to volume name */
  4019.     FSRef *                            ref;                        /* volume's FSRef */
  4020. };
  4021. typedef struct FSVolumeInfoParam        FSVolumeInfoParam;
  4022. typedef FSVolumeInfoParam *                FSVolumeInfoParamPtr;
  4023.  
  4024. /*
  4025.       GetVolumeInfo
  4026.       Returns various information about a given volume, or indexing over all volumes.
  4027.       ->    ioCompletion    A pointer to a completion routine
  4028.       <-    ioResult        The result code of the function
  4029.       ->    ioVRefNum        The volume whose information is to be returned (if volumeIndex is 0)
  4030.       ->    volumeIndex        The index of the desired volume, or 0 to use ioVRefNum
  4031.       ->    whichInfo        Which volInfo info fields to get
  4032.       <-    volumeInfo        The returned values of Volume info fields; may be NULL
  4033.       <-    nameLength        The actual length of the volume's name
  4034.       <-    name            The Unicode name is returned here.  This pointer may be NULL;
  4035.                           if not, it must point to room for at least 255 Unicode chars.
  4036.       Note: All of the outputs are optional; if you don't want that particular output, just
  4037.       set it's pointer to NULL.
  4038. */
  4039. EXTERN_API_C( OSErr )
  4040. FSGetVolumeInfo                    (FSVolumeRefNum         volume,
  4041.                                  ItemCount                 volumeIndex,
  4042.                                  FSVolumeRefNum *        actualVolume, /* can be NULL */
  4043.                                  FSVolumeInfoBitmap     whichInfo,
  4044.                                  FSVolumeInfo *            info, /* can be NULL */
  4045.                                  UniChar *                volumeName, /* can be NULL */
  4046.                                  UniCharCount *            volumeNameLength, /* can be NULL */
  4047.                                  FSRef *                rootDirectory) /* can be NULL */;
  4048.  
  4049.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4050.                                                                                             #pragma parameter __D0 PBGetVolumeInfoSync(__A0)
  4051.                                                                                             #endif
  4052. EXTERN_API( OSErr )
  4053. PBGetVolumeInfoSync                (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701D, 0xA260);
  4054.  
  4055.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4056.                                                                                             #pragma parameter PBGetVolumeInfoAsync(__A0)
  4057.                                                                                             #endif
  4058. EXTERN_API( void )
  4059. PBGetVolumeInfoAsync            (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701D, 0xA660);
  4060.  
  4061.  
  4062. /*
  4063.       SetVolumeInfo
  4064.       Set information about a given volume.
  4065.       ->    ioCompletion    A pointer to a completion routine
  4066.       <-    ioResult        The result code of the function
  4067.       ->    ioVRefNum        The volume whose information is to be changed
  4068.       ->    whichInfo        Which catalog info fields to set
  4069.       ->    volumeInfo        The new values of volume info fields
  4070.       Note: Only some of the volume info fields may be set.  The settable fields
  4071.       are given by the constant kFSVolInfoSettableInfo; no other bits may be set in
  4072.       whichInfo.
  4073. */
  4074. EXTERN_API_C( OSErr )
  4075. FSSetVolumeInfo                    (FSVolumeRefNum         volume,
  4076.                                  FSVolumeInfoBitmap     whichInfo,
  4077.                                  const FSVolumeInfo *    info);
  4078.  
  4079.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4080.                                                                                             #pragma parameter __D0 PBSetVolumeInfoSync(__A0)
  4081.                                                                                             #endif
  4082. EXTERN_API( OSErr )
  4083. PBSetVolumeInfoSync                (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701E, 0xA260);
  4084.  
  4085.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4086.                                                                                             #pragma parameter PBSetVolumeInfoAsync(__A0)
  4087.                                                                                             #endif
  4088. EXTERN_API( void )
  4089. PBSetVolumeInfoAsync            (FSVolumeInfoParam *    paramBlock)                            TWOWORDINLINE(0x701E, 0xA660);
  4090.  
  4091. /*
  4092.       FSCompareHFSPlusNames
  4093.       Compares two Unicode strings the same way that filenames on an HFS Plus
  4094.       volume are compared.  Returns the relative order of the two strings.
  4095.       Assumes the strings are in decomposed, canonical order.  Properly ignores
  4096.       "ignorable" characters.
  4097.       ->    firstNameLength        Length of first name (in Unicode characters)
  4098.       ->    firstName            Pointer to first name's text
  4099.       ->    secondNameLength    Length of second name (in Unicode characters)
  4100.       ->    secondName            Pointer to second name's text
  4101.       <-    relativeOrder        Relative order of the two names:
  4102.                                   -1    if first name < second name
  4103.                                    0    if first name = second name
  4104.                                   +1    if first name > second name
  4105. */
  4106. EXTERN_API( OSErr )
  4107. FSCompareHFSPlusNames            (UniCharCount             firstNameLength,
  4108.                                  const UniChar *        firstName,
  4109.                                  UniCharCount             secondNameLength,
  4110.                                  const UniChar *        secondName,
  4111.                                  SInt32 *                relativeOrder)                        THREEWORDINLINE(0x303C, 0x0A18, 0xAA52);
  4112.  
  4113.  
  4114. #if PRAGMA_STRUCT_ALIGN
  4115.     #pragma options align=reset
  4116. #elif PRAGMA_STRUCT_PACKPUSH
  4117.     #pragma pack(pop)
  4118. #elif PRAGMA_STRUCT_PACK
  4119.     #pragma pack()
  4120. #endif
  4121.  
  4122. #ifdef PRAGMA_IMPORT_OFF
  4123. #pragma import off
  4124. #elif PRAGMA_IMPORT
  4125. #pragma import reset
  4126. #endif
  4127.  
  4128. #ifdef __cplusplus
  4129. }
  4130. #endif
  4131.  
  4132. #endif /* __FILES__ */
  4133.  
  4134.